Bug Tracker

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#881 closed bug (duplicate)

Selector broken when an ID is preceded by a class or another ID

Reported by: [email protected] Owned by:
Priority: major Milestone:
Component: core Version: 1.1
Keywords: Cc:
Blocked by: Blocking:


In version 1.1.1, I'm getting this error message:

ret[ret.length - 1] has no properties

being thrown from this line in the jquery source:

if ( m[1] == "#" && ret[ret.length-1].getElementById ) {

for certain selectors, namely when I have an id preceded by a class or another id, for example:

$(".myClass #myId") $("#firstId #secondId")

Change History (4)

comment:1 Changed 15 years ago by [email protected]

Sorry, to be a little more specific, the line throwing the exception is in the ready() method.

comment:2 Changed 15 years ago by anonymous

Oh, another important detail: I'm only getting this error when the element being selected doesn't exist on the page.

comment:4 Changed 15 years ago by joern

Resolution: duplicate
Status: newclosed

See #895

Note: See TracTickets for help on using tickets.