How to hide the paragraph using jQuery?

Pgayath
Posted by Pgayath under jQuery category on | Points: 40 | Views : 1592
Sometimes we would want our paragraph to be hidden when clicked. Let us see with an example.

<html>
<head>
<script src="jquery.js"></script>
<script>
$(document).ready(function(){
$("p").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p>Click me! I will go off...</p>
</body>
</html>

Comments or Responses

Login to post response