Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery stop() method

jQuery stop() method

jQuery effects methods jQuery effects methods

Example

Stop the currently running animation:

$

(

"

#stop

"

)

.

click

(

function

(

)

{

$

(

"

div

"

)

.

stop

(

)

;

}

)

;

Try it »


Definition and Usage

The stop() method stops the currently running animation for the selected elements.


Syntax

$(

selector

).stop(

stopAll,goToEnd

)

Parameters Description
stopAll Optional. A Boolean specifying whether to stop all queued animations for the selected elements. The default is false.
goToEnd Optional. A Boolean specifying whether to complete the current animation immediately. The default is false.

More examples

Stop the animation queue
How to stop all queued animations for the selected elements.

Complete all animations immediately
How to complete all animations immediately.


jQuery effects methods jQuery effects methods