Hello all,

I'm getting some weird behavior from jQuery (1.2.3 and 1.2.5 alike)
when I use hierarchy selectors ("ancestor descendant", "parent >
child", "prev + next", and "prev ~ siblings") in the argument of
the .is() method.

For example, in a well-formed html document:

jQuery("body").is("div")
// returns false as expected

jQuery("body").is("div *")
jQuery("body").is("div > *")
jQuery("body").is("div ~ *")
jQuery("body").is("div + *")
// all return true, even though the body element
// isn't a child or sibling of a div element

jQuery("body").is("html#nonexistentid *")
// returns true, even though the html element has no id

Is the .is() method supposed to support selectors with hierarchical
relationships?

Jed Schmidt
[EMAIL PROTECTED]

Reply via email to