[jQuery] Wrapping tags that are not decendents
I am trying to figure out how to wrap "all a tags that are class
myclass but are not descendents of divs that are class otherclass".
ie
match this:
<div class="thirdclass"><a href="" class="myclass"></a></div>
match this:
<a href="" class="myclass"></a>
but not this:
<div class="otherclass"><a href="" class="myclass"></a></div>
Something like $('a.myclass:not(DESCENDENTOF div.otherclass)'), but
I'm not sure what DESCENDENTOF would be here.
Thanks!