Created
February 24, 2015 15:01
-
-
Save tamagokun/e2dd203f35bed0cb5517 to your computer and use it in GitHub Desktop.
dave's slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var interList; | |
var runSlides = function() { | |
interList = setInterval(function() { | |
$(".jcarousel li").fadeOut(1000).hide(); | |
$(".jcarousel li.front").removeClass("front").next().fadeIn(1000).addClass("front"); | |
$(".jcarousel li:first").appendTo(".jcarousel ul"); | |
}, 5000); | |
} | |
$(document).ready(function() { | |
$(".jcarousel li").first().addClass("front"); | |
$(".jcarousel-control-next").click(function () { | |
clearInterval(interList); | |
$(".jcarousel li").fadeOut(1000).hide(); | |
$(".jcarousel li.front").removeClass("front").next().fadeIn(1000).addClass("front"); | |
$(".jcarousel li:first").appendTo(".jcarousel ul"); | |
runSlides(); | |
}); | |
$(".jcarousel-control-prev").click(function () { | |
clearInterval(interList); | |
$(".jcarousel li:last").prependTo(".jcarousel ul"); | |
$(".jcarousel li").fadeOut(1000).hide(); | |
$(".jcarousel li.front").removeClass("front").prev().fadeIn(1000).addClass("front"); | |
runSlides(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment