http://blog.csdn.net/y_h_t/article/details/6260426
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title> Untitled Document </title>
<script type= "Text/javascript" src= "Jquery-1.3.2.min.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#each li"). Click (
function () {
$ (this). CSS ("Background", "#FF0000"). Siblings (). CSS ("Background", "#ffffff");
});
});
</script>
<style type= "Text/css" >
</style>
<body>
<div id= "Each" >
<ul>
<li>111111111111111111111111</li>
<li>222222222222222222222222</li>
<li>333333333333333333333333</li>
<li>444444444444444444444444</li>
<li>555555555555555555555555</li>
<li>666666666666666666666666</li>
<li>777777777777777777777777</li>
</ul>
</div>
</body>
What does the siblings () in jquery mean?
The siblings () method is to obtain the sibling node of the node object that invokes the method;
Sibling objects
such as:
<div id= "AAA" >
<p>1</p>
<p>2</p>