Javascript examples for jQuery:Hide
Hide the <p> element when it is clicked on.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").click(function(){ $(this).hide();//from w ww. j a v a 2s . c o m }); }); </script> </head> <body> <p>If you click on me, I will disappear.</p> </body> </html>