logo image

How to hide div in jQuery

Views: 54

Demo

Code

<html>
<head>
<script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
<script>
$(document).ready(function(){
	$(".btn").click(function(){
		$("#p1").hide();
		});
       });
</script>
</head>
<body>
<p id  = "p1"> i'll hide on button click</P>
<p id = "p2"> Foo2</p>
<button class = "btn"> Hide </button>
</body>
</html>