html - Selecting all but children -


i've got html structure this:

<div class="foo">     <ul>         <li>             <a href="link.bar">good</a>             <ul class="children">                 <li>                     <a href="otherlink.baz">bad</a>                 </li>             </ul>         </li>     </ul> </div> 

now want select "good" a without selecting "bad" a (using jquery). i've tried .foo ul:not(.children) li a doesn't work (obviously). possible achieve in one-liner?

fiddle

you direct descendant .foo > ul > li > a


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -