📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials jQuery in Practice stop() and delay()

stop() and delay()

4 min read
Use stop(true, true) to clear the animation queue and jump to the end state before starting new animations. This prevents pile-up when users hover quickly. delay() pauses between queued animations.

Controlling Animations

// Stop current animation
$('#box').stop();
$('#box').stop(true);         // clear queue
$('#box').stop(true, true);   // jump to end

// Delay next animation
$('#box').delay(1000).fadeOut();

// Finish immediately
$('#box').finish();