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
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:
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
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
4 matches
Mail list logo