The stop() is one of the animation function in Jquery. The JQuery Stop animation method is used to stop the running annotation.

JQuery Stop Animation :

The JQuery stop animation is used to stop one or more running animations. The stop() method will work on all animation functions including slideUp() slideDown() fade() and etc.

Syntax :


Here the stopAll and end, bath parameters are optional. The stopAll parameter specifies that, is the animation queue is cleared or not. By default it will be in false mode this means the stop() method will stop only currently running animation.

The end parameter specifies that, whether the currently running animation is complete till the end or stop at the moment.

JQuery Stop Example :


<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>stop demo</title>
div {
    position: absolute;
    background-color: #027d3a;
    left: 0px;
    top: 30px;
    width: 60px;
    height: 60px;
    margin: 5px;
<script src=""></script>

    <button id="go">>></button>
    <button id="stop">
    <button id="back"><<</button>
    <div class="block"></div>

        // Start animation
        $("#go").click(function() {
                left : "+=200px"
            }, 2000);

        // Stop animation when button is clicked
        $("#stop").click(function() {

        // Start animation in the opposite direction
        $("#back").click(function() {
                left : "-=200px"
            }, 2000);



Happy Learning 🙂