How To Select Element In Jquery

  1. <!DOCTYPE html>  
  2. <html>  
  3. <head>  
  4. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>  
  5. <script>  
  6. $(document).ready(function(){  
  7.     $("button").click(function(){  
  8.         $("p").hide();  
  9.     });  
  10. });  
  11. </script>  
  12. </head>  
  13. <body>  
  14.   
  15. <h2>c# corner</h2>  
  16.   
  17. <p>community for developers</p>  
  18. <p>c-sharpcorner.com</p>  
  19.   
  20. <button>Click me to hide paragraphs</button>  
  21.   
  22. </body>  
  23. </html>