2015/12/24--jquery

Source: Internet
Author: User
Tags button type

<! 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". -
&LT;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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.