Javascript examples for jQuery Selector:nth-child
Jquery selecting third child
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></script> <script type="text/javascript"> $(function(){//from w ww . j av a 2s. com $(".blue:eq(3)").css('color','red'); }); </script> </head> <body> <div class="blue"> a </div> <div class="blue"> b </div> <div class="blue"> c </div> <div class="blue"> d </div> </body> </html>