Example One,
<body> <p><span>hello</span>, How is you?</p> <script>$ ("P"). FIND ("span"). End ( ). CSS ("Border", "2px red Solid"); </script></body>//description//$ ("P"). FIND ("span") represents a SPAN element under the P element//But I want to change the border of P , I'm going to return to the P element (that is, return from span to p, or revert to the previous state)//$ ("P"). FIND ("span"). End () this statement returns. $ ("P"). FIND ("span"). End (). CSS ("Border", "2px Red Solid") set the border of P.
Example Two,
<div id= "Test" >
Example Three,
<script type= "Text/javascript" > $ (function () { $ (' <input type= ' button " value=" Click me " /><input type=" Button " value=" Triggle click me " /><input type=" button " value=" Detach handle " /><input type=" button " value=" Show/hide text " />"). AppendTo ($ ( ' body '); $ (' input[type= "button"] "). EQ (0). Click (function () { alert (' you clicked me! '); }) .end (). EQ (1) . Click (function () { $ (' input[type= ') Button "]:eq (0)"). Trigger (' click '); }) .end (). EQ (2). Click (function () { $ (' input[typw= ') Button "]:eq (0)"). Unbind (' click '); }) .end (). EQ (3). Toggle (function () { $ ('. Panel '). Hide (' slow '); },function () { $ ('. Panel '). Show (' Slow '); }); }) </script><div class= "Panel" > Welcome to jquery!</div>
Reference: JQuery end () http://www.studyofnet.com/news/932.html
This article is from the "Learning also leisure" blog, please be sure to keep this source http://studyofnet.blog.51cto.com/8142094/1695698
JQuery End () instance