Javascript examples for jQuery Selector:class
Select classes with jQuery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w w w. j a v a2 s . c om*/ $(".myChild").slice(1).css("color", "#C00"); }); </script> </head> <body> <p class="myChild">one</p> <p class="myChild">two</p> <p class="myChild">three</p> </body> </html>