Easy Tutorial
❮ Jq Event Relatedtarget Html Removeclass ❯

jQuery stop()

The jQuery stop() method is used to stop animations or effects before they are completed.

Click here to slide the panel up/down.

Time is precious, so we provide quick and easy-to-understand learning content.

Here, you can obtain any knowledge you need through an easy-to-understand and convenient mode.


Examples

jQuery stop() Sliding

jQuery stop() Animation (with parameters)


jQuery stop() Method

The jQuery stop() method is used to stop animations or effects before they are completed.

The stop() method works with all jQuery effect functions, including sliding, fading, and custom animations.

Syntax:

The optional stopAll parameter specifies whether the animation queue should be cleared. The default is false, meaning only the active animation is stopped, allowing any queued animations to proceed.

The optional goToEnd parameter specifies whether the current animation should be completed immediately. The default is false.

Therefore, by default, stop() clears the current animation specified on the selected element.

The following example demonstrates the stop() method without parameters:

Example

$("#stop").click(function(){
  $("#panel").stop();
});
❮ Jq Event Relatedtarget Html Removeclass ❯