Select starting with class in jquery like in CSS - Javascript jQuery Selector

Javascript examples for jQuery Selector:class

Description

Select starting with class in jquery like in CSS

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://code.jquery.com/jquery-2.0.2.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//ww w.  j a v a  2 s  .co  m
$('li[class^="nav"]').css({color: 'pink'});
    });

      </script> 
   </head> 
   <body> 
      <ul> 
         <li class="navs">navs</li> 
      </ul>  
   </body>
</html>

Related Tutorials