jQuery USES the hide method to hide the method of the specified element on the page
- 2020-05-19 04:12:36
- OfStack
This article demonstrates how jQuery USES the hide method to hide specified elements on a page. Share with you for your reference. The details are as follows:
The JS code below hides everything in the page < p > Tag content
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>
I hope this article is helpful for you to design jQuery program.