I am trying to make a webpage that uses a moving div that slowly moves to the left. There is also another div that moves on top of it to the right that gives a 3D effect (but that’s beside the point).
What I am trying to do right now has made a 7000px wide div that slowly moves to the left (animating the “right” property of CSS with jQuery animate()), but after it’s all moved by, the animation ends.
Is there a way to make the div an infinite width or at least cause it to go back to the beginning (much like a grocery store checkout moving belt thing) so the animation never stops?
I am thinking this requires a few seperate divs, each once it reaches its end, goes back, but I can’t figure out how to do that as I am a beginner jQuery developer.
UPDATE
Taking in account your example at http://nth.brandonwang.org/stuhf2/simpleindex.html you can fix it just by adding a callback at the end, your script must be like this:
Basically we just reset the animated css property and start de animation effect, the animation duration is faster in this code just to help to see the effect.
Hope that it helps you