jQuery Tutorial
jQuery Introduction jQuery Getting Started jQuery Syntax jQuery Selectors jQuery Events
jQuery Effects
jQuery Hide/Show jQuery Fade jQuery Slide jQuery Animation jQuery stop() jQuery Callback jQuery Chaining
jQuery Manipulation
jQuery Get/Set jQuery Add jQuery Remove jQuery CSS Classes jQuery css() jQuery Dimensions
jQuery Traversing
jQuery Traversing jQuery Ancestors jQuery Descendants jQuery Siblings jQuery Filtering
jQuery AJAX
jQuery AJAX Intro jQuery Load jQuery Get/Post jQuery AJAX Events
jQuery Misc
jQuery noConflict() jQuery Filters
jQuery References
jQuery Reference jQuery Selectors jQuery Events jQuery Effects jQuery HTML/CSS jQuery Traversing jQuery AJAX jQuery Miscellaneous jQuery Properties

jQuery Stop Animations

The jQuery stop() method is used to stop the jQuery animations or effects before it completes.

Click to slide up/down the panel

jQuery is a fast, lightweight, and feature-rich JavaScript library that is based on the principle "write less, do more".

jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

jQuery is a fast, lightweight, and feature-rich JavaScript library that is based on the principle "write less, do more".

jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.



jQuery stop() Method

The stop() method stops the jQuery animations or effects currently running on the selected elements before it completes.

When stop() is called on an element, the currently-running animation (if any) is immediately stopped.

If more than one animation method is called on the same element, the later animations are placed in the effects queue.

Here is the syntax for stop() method:

$(selector).stop(clearQueue, jumpToEnd)

The stop() method accepts two optional parameters:

  • clearQueue - A Boolean indicating whether to remove queued animation as well. Default is false
  • jumpToEnd - A Boolean indicating whether to complete the current animation immediately. Default is false

The following example stops the currently running animation:

Run code

The following example stops queued animations as well:

Run code

The following example complete all animations immediately:

Run code

jQuery Effects Reference

For a complete effects reference, visit our jQuery Effects Reference.