JQuery Hide

 

In this example, we are going to hide the text of <p> tag using hide() function.

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script> <script> $(document).ready(function() { $(".hide").click(function() { $("p").hide(); }); }); </script> </head> <body> <p>Click hide button to hide this text</p> <button class="hide">Hide</button> </body> </html> <!-- In this example, we are going to hide the text of <p> tag using hide() function. -->
Output