Select classes with jQuery - Javascript jQuery Selector

Javascript examples for jQuery Selector:class

Description

Select classes with jQuery

Demo Code

ResultView the demo in separate window

<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>

Related Tutorials