Select top level list items only with Cufom, Jquery
The below JS is selecting all of the list items, i need to select only the top level list item anchors.
HTML and Cufon below:
<script type="text/javascript">
     Cufon.replace('#navigation ul#nav li a', {
         textShadow: '#dedede -1px -1px',
         hover: { color: '#2a668f' }
     });
 </script>
<ul>
<li><a></a>&开发者_开发问答lt;/li>
<li><a></a></li>
<li><a></a>
  <ul>
  <li><a></a></li>
  <li><a></a></li>
  <li><a></a></li>
  </ul>
</li>
</ul>
Thanks in advance.
Use the child selector:
Cufon.replace('#navigation ul#nav > li > a'
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论