Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to chain multiple methods in single statement

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 156
    Comment on it

    If we want to run different methods with in single statement than we can achieve it by using jQuery chaining property . With the help of jQuery chaining property we can chain different methods with each other.

    JQuery chaining property allows us to execute more than one statements at a same time. 

     If you want to use chain methods, we have to append the method to the previous method.

    In below example we are chaining css with slideup() and slidedown() methods.

    <!DOCTYPE html>
    <script src=""></script>
            $(".chain").css("color", "#BD6982").slideUp(1000).slideDown(1000);
    <div class="chain">Lorem ipsum </div>
    <button style="background-color:#6EA435;border:1px solid #000

    working demo:-

 0 Comment(s)

Sign In

Sign up using

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: