Andy Matthews schrieb:
> Then I guess I'm not understanding what a filter is then. The API for
> not() says this:
>
> "Removes the specified Element from the set of matched elements."
>
> The API for filter() says this:
>
> "Removes all elements from the set of matched elements that do not
> match the specified expression."
>
> That seems to me like it should work.
>
> $('a') // select all a elements
> $('a').not('li a') // that are not children of an LI tag
Then the API is wrong.
filter() (and it's inversion, not()), can only handle expressions down
the tree, not upwards. In other words: It can only check for attributes
or child elements, but has no idea of the context the element is in.
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/