JQuery uses the hide method to hide specified elements on a page
This article mainly introduces how jQuery uses the hide method to hide specified elements on a page. It involves jQuery's tips for hiding Elements Using hide and has some reference value. For more information, see
This document describes how jQuery uses the hide method to hide specified elements on a page. Share it with you for your reference. The details are as follows:
The following JS Code hides the content of all <p> labels on the webpage.
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<! 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 <P> This is a paragraph. </p> <P> This is another paragraph. </p> <Button> Click me </button> </Body> </Html> |
I hope this article will help you with jQuery programming.