HTML and CSS Reference
In-Depth Information
left : currSlide * - 900
}, 400 , 'swing' , function () {
// hide / show the arrows depending on which frame it's on
if ( currSlide == 0 ) $slidePrevNav . hide ();
else $slidePrevNav . show ();
if ( currSlide == maxSlide ) $slideNextNav . hide ();
else $slideNextNav . show ();
// set new timeout if active
if ( activeSlideshow ) slideTimeout = setTimeout ( nextSlide , 1200 );
});
// animate the navigation indicator
$activeNavItem . animate ({
left : currSlide * 150
}, 400 , 'swing' );
}
function nextSlide () {
changeSlide ( currSlide + 1 );
}
// define some variables / DOM references
var activeSlideshow = true ,
currSlide = 0 ,
slideTimeout ,
$slideshow = $ ( '#slideshow' ),
$slideReel = $slideshow . find ( '#slideshow-reel' ),
maxSlide = $slideReel . children (). length - 1 ,
$slidePrevNav = $slideshow . find ( '#slideshow-prev' ),
$slideNextNav = $slideshow . find ( '#slideshow-next' ),
$activeNavItem = $slideshow . find ( '#active-nav-item' );
// set navigation click events
Search WWH ::




Custom Search