开发者

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜