The JQuery siblings () method returns all the sibling elements of the selected element, and can use optional parameters to filter the search for sibling elements.
Example Demo: Click on an li tag to set it toRGB (248,198,173)Orange style, while its all-fellow elements are removed#FFFFFF(White style)
<div id=" each"> <span> Tags:</span> <ulclass="right-topfloat"> <li style="Background-color:rgb (248,198,173)"> All </li> <li> orders </li> <li> distribution </li> <li> Payment </li> <li> Services </li> </ul> </div><!--Jquery--><script type="Text/javascript">$ (document). Ready (function () {$ ("#each Li"). Click (function () {$ ( This). CSS ("Background-color","RGB (248,198,173)"). Siblings (). CSS ("Background-color","#FFFFFF"); }); </script>
The HTML page timestamp is converted to the normal time display:
The Ng-click event:
Layer: A popup window jquery control.
Notes B---jquery.siblings (), HTML page timestamps convert to normal time display, Ng-click event notation