Ooooh...

I think I see now. You're saying that once I get a jQuery object, I can
filter out children of that object but not parents?

Can you give me a quick example Jörn?

____________________________________
 
Andy Matthews
Senior Coldfusion Developer
 
Office:  877.707.5467 x747
Direct:  615.627.9747
Fax:  615.467.6249
[EMAIL PROTECTED]
www.dealerskins.com
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jörn Zaefferer
Sent: Monday, January 08, 2007 5:18 PM
To: jQuery Discussion.
Subject: Re: [jQuery] select links not children of li

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
discuss@jquery.com
http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to