$('a.myclass:not(div.otherclass a.myclass)');

On Mar 2, 7:48 pm, ml1 <tsummer...@gmail.com> wrote:
> 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!

Reply via email to