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?
you direct descendant .foo > ul > li > a
Comments
Post a Comment