I have a setInterval()
which effectively loops a set of images fading in and out on top of each other.
Here is a fiddle: http://jsfiddle.net/CBWKa/
The problem I'm having is the same as this though: My recursive setTimeout function speeds up when tab becomes inactive
When you switch tabs away for a few minutes and switch back the animation speeds up drastically almost like its trying to "catch up" with itself.
So I've learnt that the best way to get around this is to use .delay()
and .queue()
rather than javascript's setTimeout
and setInterval
functions. However, I can't work out how to use the two functions to create a looping animation function on several elements (not just the one).
Can anyone help me please?
Thank you.