Example #19: pause animation cycle on mouseover
There is a animation cycle rotating three images. Once you move the mouse cursor over it, it pauses until the mouse is moved away.
A little helper function checks whether the mouse is over the image. If that's the case a deferred jQuery object waiting for the mouseleave event is returned.The running loop can be written in a single jQuery line.
⇒Other examples with animations
Other examples with each-loops
Other examples with open loops
- Example #1: repeated blinking (like in the old days with the deprecated
<blink>
element) - Example #2: repeated blinking with iterated timeouts
- Example #6: iterate all selected elements with a timeout
- Example #7: clock display with one short blink per second
- Example #8: simple progress indicator with text
- Example #14: wait a timeout after each click before blinking
- Example #16: playing pong with divs
- Example #17: scheduling different elements' animations
- Example #20: ruler with animation
Other examples with timeouts
- Example #2: repeated blinking with iterated timeouts
- Example #6: iterate all selected elements with a timeout
- Example #7: clock display with one short blink per second
- Example #10: fading submenus with user friendly timeouts
- Example #14: wait a timeout after each click before blinking
- Example #15: enable continue button only after making choices
- Example #18: falling little boxes