A quick question about jquery animations…
I’ve done a rather long jquery animation (about 45 seconds) which has many layers of setTimeout and callbacks. In short, I’m in deep trouble if someone clicks “start” while the animation is running, because then it will start a new animation loop without stopping the old one, so I’ll have two running at the same time… you see the problem.
Is there any technique out there which would let me either 1) block the functionality of the “start” button until the animation is finished, or 2) stop an animation loop in the middle and reinitialize if a user hits the “start” button ?
My thanks in advance – any advice would be VERY much appreciated!
When you start your animation disable your button like
Then on your complete off animation renable the button