<! DOCTYPE html>
<meta charset= "UTF-8" >
<title>jquery</title>
<script src= "/jquery/jquery-1.11.1.min.js" >
</script>
<script>
$ (document). Ready (function () {
$ ("P"). Click (function () {
$ (this). Hide ();
});
});
</script>
Demonstrates the Hide () function of JQuery, hiding the current HTML element.
<script type= "Text/javascript" src= "/jquery/jquery.js" >
</script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("button"). Click (function () {
$ (this). Hide ();
});
});
</script>
Demonstrates the Hide () function of jQuery, hiding all <p> elements.
<script type= "Text/javascript" src= "/jquery/jquery.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("button"). Click (function () {
$ ("P"). Hide ();
});
});
</script>
Demonstrates the Hide () function of jQuery, hiding all elements of the class= "test".
<script type= "Text/javascript" src= "/jquery/jquery.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function ()
{
$ ("button"). Click (Function ()
{
$ (". Test"). Hide ();
});
});
</script>
Demonstrates JQuery's hide () function, which hides elements of the id= "test".
<script type= "Text/javascript" src= "/jquery/jquery.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("button"). Click (function () {
$ ("#test"). Hide ();
});
});
</script>
Demonstrates a simple jQuery fadeout () function.
<script src= "/jquery/jquery-1.11.1.min.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("button"). Click (function () {
$ ("#div1"). FadeOut ();
$ ("#div2"). FadeOut ("slow");
$ ("#div3"). FadeOut (3000);
});
});
</script>
Shows how to hide some text.
<script src= "/jquery/jquery-1.11.1.min.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ (". Ex. Hide"). Click (function () {
$ (this). Parents (". ex"). Hide ("slow");
});
});
</script>
<style type= "Text/css" >
Div.ex
{
Background-color: #e5eecc;
padding:7px;
Border:solid 1px #c3c3c3;
}
</style>
<body>
<p> Click Me, I will disappear oh. </p>
<p> Click on me, then disappear oh. </p>
<p> also want to click on me. </p>
<!--show JQuery's Hide () function to hide the current HTML element. -
<button type= "button" >click me</button>
<!--//show JQuery's Hide () function to hide all <p> elements. -
<p>this is a paragraph.</p>
<p>this is another paragraph.</p>
<button type= "button" >click me</button>
<!--demonstrates JQuery's hide () function, hiding all elements of class= "test". -
<H2 class= "Test" >this is a heading<p class= "Test" >this is a paragraph.</p>
<p>this is another paragraph.</p>
<button type= "button" >click me</button>
<!--demonstrates JQuery's hide () function, hiding the element id= "test". -
<p>this is a paragraph.</p>
<p id= "Test" >this is another paragraph.</p>
<button type= "button" >click me</button>
<!--demonstrates the simple jQuery fadeout () function. -
<p> demonstrates the FadeOut () method with different parameters. </p>
<button> Click here to make three rectangles fade out </button>
<br><br>
<div id= "Div1" style= "width:80px;height:80px;background-color:red;" ></div>
<br>
<div id= "Div2" style= "Width:80px;height:80px;background-color:green;" ></div>
<br>
<div id= "Div3" style= "Width:80px;height:80px;background-color:blue;" ></div>
<!--shows how to hide some text. -
<div class= "Ex" >
<button class= "Hide" type= "button" > Hidden </button>
<p> Contact: Mr. Zhang <br/>
No. 100th North Third ring road <br/>
Beijing </p>
</div>
<div class= "Ex" >
<button class= "Hide" type= "button" > Hidden </button>
<p> Contact: david<br/>
<br/>, no. No. 200, five Street
New York </p>
</div>
</body>
2015/12/24--jquery