last image of the slide jquery -
i trying mo make slide that, when last image shows, 1st image slide next last image.
but got on result of code is, when in last image, first image blink..
here,s code.
var sliderul = $(".slider").css("overflow", "hidden").children("ul") imgs = sliderul.find("li"), imgwidth = 913, imgslen = imgs.length, current = 1; setinterval(function(){ sliderul.animate({"margin-left": "-=" +imgwidth},1000, function(){ current ++; if (current === imgslen) { current = 1; sliderul.css("margin-left", 0) }; }); },3000);
Comments
Post a Comment