.stop([clearQueue] [, jumpToEnd]) stops the currently-running animation on matched elements (since 1.2). Since 1.7 you can also target a named queue: .stop([queue] [, clearQueue] [, jumpToEnd]).
Remember
$("#box").stop(); // freeze current tween
$("#box").stop(true); // freeze + clear remaining queue
$("#box").stop(true, true); // clear queue + jump to end CSS
$("#box").stop("fx", true, true); // same, named queue (1.7+)
// Hover-safe fade (official pattern)
$("#hover").hover(
function () { $(this).find("img").stop(true, true).fadeOut(); },
function () { $(this).find("img").stop(true, true).fadeIn(); }
);
Pick the flags that match what should happen to the active tween and the rest of the fx queue.
Start an animation with .animate(), .fadeIn(), .slideUp(), etc.
Call .stop() on the same element when you need to interrupt it.
Set clearQueue if later queued steps should never run.
Set jumpToEnd if the element should jump to the current step’s target CSS.
On hover/click storms, prefer .stop(true, true) before starting a new effect.
Argument
Default
Role
clearQueue
false
Remove remaining animations from the queue
jumpToEnd
false
Complete the current animation immediately (fires its callback)
queue
"fx"
Named queue to stop (string form since 1.7)
Pseudocode
Pseudocode
if animation is running on element:
stop the current tween
if jumpToEnd:
set CSS to that tween's final values
run that tween's complete callback
else:
leave CSS where it is
do NOT run complete
if clearQueue:
discard remaining queued animations
else:
start the next queued animation now
Reference
Cheat Sheet
Quick facts while debugging animation queues.
Topic
Detail
Returns
jQuery (chainable)
Since
1.2 · queue-name overload 1.7
.stop()
Freeze · next queue item runs
.stop(true)
Freeze · clear remaining queue
.stop(true, true)
Jump to end · clear remaining queue
vs .finish()
.finish() also applies queued steps’ end CSS
Hover tip
.stop(true, true) before fade/slide
Try it
Live Preview
Animate a box, then try different .stop() flag combinations.
Runs in the browser — watch the box and the status line.
=======
Status
Ready — pick an action and click Run.
Code
jQuery Examples
Short, copy-ready snippets. Open DevTools Console, or use Try It Yourself for a live editor.
Example 1 — Stop Mid-Animation
Start a long move, then freeze it where it is.
jQuery
$("#go").on("click", function () {
$("#box").animate({ marginLeft: 160 }, 2000);
});
$("#stop").on("click", function () {
$("#box").stop();
});
$("#back").on("click", function () {
$("#box").animate({ marginLeft: 0 }, 2000);
});
Hover: use .stop(true, true) before fade/slide on enter/leave.
vs finish:.finish() also applies queued end states; .stop(true, true) does not.
One line:.stop() interrupts the current tween — add flags to clear the queue and/or jump to the end.
Frequently Asked Questions
.stop() immediately stops the currently-running animation on matched elements. By default the element freezes at its in-progress CSS values. If clearQueue is false (default), the next queued animation starts right away.
clearQueue (default false) removes remaining animations from the queue when true. jumpToEnd (default false) snaps the current animation to its target CSS and runs its complete callback when true. .stop(true, true) clears the queue and finishes the active step.
No — unless jumpToEnd is true. A plain .stop() freezes without calling the current step’s complete handler. With jumpToEnd true, the callback for that active step runs after the snap-to-end.
.stop(true, true) clears pending queue items and jumps only the current animation to its end CSS — queued steps never apply. .finish() (since 1.9) completes the current animation and every queued animation to their final CSS values.
On rapid hover or click handlers before starting a new fadeIn / fadeOut / slide. It clears stacked tweens and jumps to the end state so half-finished effects do not queue up and flicker.
You can pass a queue name string as the first argument: .stop(queue, clearQueue, jumpToEnd). Also, stopping a toggled animation mid-flight keeps better internal toggle state than older versions did.