Skip to content

Instantly share code, notes, and snippets.

@Stephenitis
Last active December 16, 2015 22:20
Show Gist options
  • Select an option

  • Save Stephenitis/5506323 to your computer and use it in GitHub Desktop.

Select an option

Save Stephenitis/5506323 to your computer and use it in GitHub Desktop.
$(document).ready( function() {
setInterval(function(){
$(".frames").animate({
marginLeft: '-=100%'
},1000, function(){
$(this).find("li:last").after($(this).find("li:first"));
$(this).css({marginLeft:0});
})
},30);
});
$(document).ready( function() {
setInterval(function(){
$("#next_frame").on("click", function(){
$(".frames").animate({
marginLeft: '-=100%'
},1000, function(){
$(this).find("li:last").after($(this).find("li:first"));
$(this).css({marginLeft:0});
});
})
$("#previous_frame").on("click", function(){
$(".frames").animate({
marginLeft: '+=100%'
},1000, function(){
$(this).find("li:first").before($(this).find("li:last"));
$(this).css({marginLeft:0});
});
})
});
http://www.my-html-codes.com/easy-jquery-carousel
http://www.createjs.com/#!/EaselJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment