-
-
Save anonymous/2852c3ca6228a1a981c045f4a0626eeb to your computer and use it in GitHub Desktop.
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
$(function() { | |
var currentSlide = 1; | |
setInterval(function() { | |
$(".slides").css("margin-left", "-=1100"); | |
$(".slides").on('transitionend webkitTransitionEnd oTransitionEnd', function() { | |
currentSlide++; | |
console.log(currentSlide); | |
if (currentSlide === $(".slide").length) { | |
currentSlide = 1; | |
$(".slides").css("transition", "0s"); | |
$(".slides").css("margin-left", "0"); | |
$(".slides").css("transition", "1s linear"); | |
console.log("end"); | |
} | |
}); | |
}, 3000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment