Last active
August 29, 2015 14:13
-
-
Save zourite/5c529cc621f66bf69e58 to your computer and use it in GitHub Desktop.
Un simple slider qui permet de faire défiler des éléments
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
jQuery(document).ready(function () { | |
$(".slide").not(".current").hide(); | |
setInterval(function() { | |
$(".current").nextAll(".slide").first().slideDown("slow").addClass("current"); | |
$(".current").prevAll().removeClass("current"); | |
$(".slide").not(".current").hide(); | |
if($(".current").is(':last-child')) | |
{ | |
$(".slide").first().addClass("current"); | |
$(".current").last().removeClass("current"); | |
} | |
}, 10000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment