hide() method in jquery

hide() method in jquery is used to hide an element.


<html>
<head>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("p").click(function(){
    $(this).hide();
  });
});
</script>
</head>
<body>
<p>mahak</p>
<p>Hide</p>

</body>
</html>



In this program when we click on these paragraphs, they will be hide.

Ebook Download
View all
Learn
View all