I\'m trying to create a kind of slideshow.
The problem:
function slides(x) {
$(\"#irack\").stop().animate({\"left\": x}, 20);
};
setInterval
Oh, I've found the problem :D
$("#irack").stop().animate({"left": x}, 20);
The problem is that "x" is a constant, and it changes the "left" to x and keeps it that way.
I should do this way:
x=$("#irack").offset().left+x;
$("#irack").stop().animate({"left": x}, 20);
And thanks a lot for pointing that "wrapping" stuff :D.