[jQuery] Re: filter not working when expression contains spaces

2007-09-27 Thread duff
Thanks James. In the example i was considering an 'a' element with one of its parents with class myClass. If the filter isn't meant to work that way i guess i will have to use the $() function instead. But then again, if the filters only apply to the element, why does it filter nothing

[jQuery] Re: filter not working when expression contains spaces

2007-09-27 Thread Erik Beeson
This is the expected behavior. The selector '.myClass a' describes an A tag being a descendant of a tag with the class myClass. is() doesn't work on a relationship as the result is ambiguous. To check if this element is an A tag that is a descendant of of a tag with class myClass, maybe try:

[jQuery] Re: filter not working when expression contains spaces

2007-09-27 Thread Guy Fraser
duff wrote: But then again, if the filters only apply to the element, why does it filter nothing regardless of the filter if it contains spaces ?. Shouldn't the filter return nothing if the expression cannot be evaluated ?(fail safe rather than silently) +10 I concur - it should return

[jQuery] Re: filter not working when expression contains spaces

2007-09-26 Thread James Dempster
The filter you specified is one rule with two elements described in it. Being firstly an element with a class attribute containing myClass with a child anchor element. Maybe you possibly mean a.myClass meaning an anchor element which has a myClass class attribute? As I think filter will only