Skip to main content

Bug Tracker

Side navigation

#3430 closed bug (wontfix)

Opened October 01, 2008 04:41AM UTC

Closed October 01, 2008 02:25PM UTC

Last modified October 14, 2008 10:51AM UTC

is() function not handling expressions properly

Reported by: tremby Owned by: flesler
Priority: major Milestone: 1.3
Component: selector Version: 1.2.6
Keywords: Cc: tremby
Blocked by: Blocking:

$("body").is("div span") is returning true

it should always return false, since a body element is /not/ a span element which is a descendant of a div element.

is() seems to return true if there are any two things separated by space, for instance $(whatever).is(".bigclass .otherclass")

Attachments (0)
Change History (4)

Changed October 01, 2008 02:25PM UTC by flesler comment:1

resolution: → wontfix
status: newclosed

is() doesn't support complex selectors (those including spaces, >, etc).

We might add this for 1.3.

Changed October 01, 2008 02:26PM UTC by flesler comment:2

component: unfilledselector

Changed October 02, 2008 02:15AM UTC by tremby comment:3

can you at least mention that in the documentation? it only says it supports "expressions", which anyone would logically assume means anything on the "selectors" page of the docs.

Changed October 02, 2008 03:00PM UTC by flesler comment:4

cc: → tremby


'''Note:''' Only simple expressions are supported. Complex expressions, such as those containing hierarchy selectors (such as +, ~, and >) will always return 'true'.