Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • JQuery Chaining

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 35
    Comment on it

    For running multiple jQuery methods within a single statement,we make use of chaining.
    here is the example:

    <!DOCTYPE html>
    <html>
    <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
        $("button").click(function(){
            $("#k").css("color", "green").slideUp(2000).slideDown(2000);
        });
    });
    </script>
    </head>
    <body>
    
    <p id="k">Findnerd</p>
    
    <button>result</button>
    
    </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: