Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Jquery stop() method

    • 0
    • 3
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 147
    Comment on it

    It stops the currently running animation for the specified element.

    Syntax: $(selector).stop()

    Example:

    <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script> 
    $(document).ready(function()
    {
        $("#start").click(function()
        {
                    $("div").animate({height: 300}, 4000));
    
            });
    
         $("#stop").click(function()
         {
            $("div").stop();
          });
    
    });
    </script> 
    </head>
    <body>
    
    
    
    <div style="background:pink;height:100px;width:100px">
    <button id="start">Start</button>
    <button id="stop">Stop</button>
    </div>
    
    </body>
    </html>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: