Template:Team:KIT-Kyoto/hp
From 2014.igem.org
(Difference between revisions)
Line 12: | Line 12: | ||
var loop = setInterval(function() { | var loop = setInterval(function() { | ||
- | var clone = $(".pic li:first").clone(true); | + | var pic = $(".pic").index(this); |
- | $(".pic li:first").animate({ | + | var clone = $(".pic li:first").eq(pic).clone(true); |
+ | $(".pic li:first").eq(pic).animate({ | ||
marginRight : "-300px" | marginRight : "-300px" | ||
}, { | }, { | ||
duration : 1200, | duration : 1200, | ||
complete : function() { | complete : function() { | ||
- | $(".pic li:first").remove(); | + | $(".pic li:first").eq(pic).remove(); |
- | clone.clone(true).insertAfter($(".pic li:last")).fadeIn(); | + | clone.clone(true).insertAfter($(".pic li:last").eq(pic)).fadeIn(); |
} | } | ||
}); | }); |
Revision as of 06:42, 26 September 2014