Click to hide paragraph - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

Click to hide paragraph

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.2.min.js">  
      </script> 
      <script type="text/javascript">
    $(document).ready(function(){
    $("p").click(function(){
    $(this).hide();//from   w  w  w.  ja  v a  2  s. c om
   });
  });
  
      </script> 
   </head> 
   <body> 
      <p>If you click on me, I will disappear.</p>  
   </body>
</html>

Related Tutorials