Advertisement
Guest User

Untitled

a guest
Apr 11th, 2012
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function() {
  2.                            
  3.     // Define new scrolling function
  4.     $.fn.cycle.transitions.scrollHorzRev = function($cont, $slides, opts) {
  5.         $cont.css('overflow','hidden').width();
  6.         opts.before.push(function(curr, next, opts, fwd) {
  7.             if (opts.rev)
  8.                 fwd = !fwd;
  9.             $.fn.cycle.commonReset(curr,next,opts);
  10.             opts.cssBefore.left = fwd ? (1-next.cycleW) : (next.cycleW-1);
  11.             opts.animOut.left = fwd ? curr.cycleW : -curr.cycleW;
  12.         });
  13.         var w = $cont.width();
  14.         opts.cssFirst.left = 0;
  15.         opts.cssBefore.top = 0;
  16.         opts.animIn.left = 0;
  17.         opts.animOut.top = 0
  18.     };
  19.    
  20.     // Initiate sliders
  21.     $('.slideHeadlines .slides').cycle({
  22.         fx: 'scrollHorzRev',
  23.         prev:   '.sliderPrev',
  24.         next:   '.sliderNext',
  25.         timeout:    500
  26.     });
  27.    
  28.     $('.slideCaptions .slides').cycle({
  29.         fx:     'scrollHorz',
  30.         prev:   '.sliderPrev',
  31.         next:   '.sliderNext',
  32.         timeout:    500
  33.     });
  34.    
  35.     $('.slideImages .slides').cycle({
  36.         fx:     'scrollHorz',
  37.         prev:   '.sliderPrev',
  38.         next:   '.sliderNext',
  39.         timeout:    500
  40.     });
  41.    
  42.     // Fade slider nav
  43.     $('.hero').hover(function() {
  44.         $('.sliderNav a').fadeIn();
  45.     },
  46.    
  47.     function() { $('.sliderNav a').fadeOut();
  48.     })
  49. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement