jQuery stop()Method

jQuery 效果方法jQuery Effects Methods

Examples

Stop the currently running animation:

$("#stop").click(function(){ $("div").stop(); });

Try it yourself »

Definition and Usage

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


Syntax

$(selector).stop(stopAll,goToEnd)

Parameter Description
stopAll Optional. A boolean value specifying whether to stop all queued animations for the selected elements. Default is false.
goToEnd Optional. A boolean value specifying whether to immediately complete the current animation. Default is false.

实例

More Examples

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

Immediately complete all animations
How to immediately complete all animations.


jQuery 效果方法jQuery Effects Methods

Other extensions