Skip to content
Loading
 
0
  • Bidyasagar Mishra
    0
    Chaining allows us to run multiple jQuery methods within a single statement.
    1. >  
    2. <html>  
    3. <head>  
    4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">script>  
    5. <script>  
    6. $(document).ready(function(){  
    7.   $("button").click(function(){  
    8.     $("#p1").css("color", "blue")  
    9.       .slideDown(2000)  
    10.       .slideUp(2000);  
    11.   });  
    12. });  
    13. script>  
    14. head>  
    15. <body>  
    16.   
    17. <p id="p1">jQuery is chaining!!p>  
    18.   
    19. <button>Click mebutton>  
    20.   
    21. body>  
    22. html>  
     
    0