Stopping Animation
$("*").stop(); $("#img1").stop(true); $("img").stop(true, true);
jQuery allows you to stop the animations currently executing on elements contained in the jQuery object set. The .stop([clearQueue] [, jumpToEnd]) method allows you stop animations in a few different ways.
Calling .stop() with no parameters simply pauses the animations that are in the queue. The next animation that starts begin executing the animations in the queue again. For example, the following code pauses all animations:
$("*").stop();
Calling .stop(true), with the cleareQueue option set to true stops animations at the current point and removes all animations from the queue. For example, the following stops all animations on images and removes the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access