Mega Code Archive

 
Categories / JavaScript Tutorial / JQuery
 

Select n-th child

< html>   <head>     <script type="text/javascript" src="js/jquery-1.3.2.js"></script>     <script type="text/javascript">     $(document).ready(function(){         $("ul li:nth-child(2)").append("<span>*</span>");     });     </script>   </head>   <body>       <div>         <ul>             <li>A</li>             <li>B</li>             <li>C</li>         </ul>       </div>   </body> </html>