views:

23

answers:

1

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

+1  A: 

Use the child selector:

Cufon.replace('#navigation ul#nav > li > a'
Pekka