Javascript examples for jQuery Selector:class
Select starting with class in jquery like in CSS
<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>