HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The jQuery stop() method is used to stop animations or effects before it is finished
The jQuery stop()
method is used to stop an animation or effect before it is finished.
The stop()
method works for all jQuery effect functions, including sliding, fading and custom animations.
The optional stopAll parameter specifies whether also the animation queue should be cleared or not. Default is false, which means that only the active animation will be stopped, allowing any queued animations to be performed afterwards.
The optional goToEnd parameter specifies whether or not to complete the current animation immediately. Default is false.
So, by default, the stop()
method kills the current animation being performed
on the selected element.
The following example demonstrates the stop()
method, with no parameters:
$("#stop").click(function(){
$("#panel").stop();
});
Use a jQuery method to stop the animation effect of a <div> element.
$("div").();
For a complete overview of all jQuery effects, please go to our jQuery Effect Reference.