[jQuery] Re: jquery documentation of exlusion pseudo-class

2008-05-30 Thread duck!
On second thoughts, it looks like you want the div that contains the span but without the span in it? I think there is something wrong that your logic there, but depending on what you want to do something like this might work for you: $("div:has(span)").find("span").remove().end(); That will remo

[jQuery] Re: jquery documentation of exlusion pseudo-class

2008-05-30 Thread duck!
$("div:not(span)"); will return all the divs in the document that are not spans... all of them obviously You want all the divs that don't (:not()) contain (:has()) spans. $("div:not(:has(span))"); hope this helps. jquertil wrote: > > > according to jquery documentation I should be able to s