Skip to main content

Bug Tracker

Side navigation

#881 closed bug (duplicate)

Opened January 24, 2007 05:05PM UTC

Closed January 31, 2007 09:39PM UTC

Last modified June 19, 2007 08:13AM UTC

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

Reported by: jgrucza@digitaladvis Owned by:
Priority: major Milestone:
Component: core Version: 1.1
Keywords: Cc:
Blocked by: Blocking:
Description

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")

Attachments (0)
Change History (4)

Changed January 24, 2007 05:10PM UTC by jgrucza@digi comment:1

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

Changed January 25, 2007 06:35PM UTC by anonymous comment:2

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

Changed January 25, 2007 09:53PM UTC by aaron.heimli comment:3

Changed January 31, 2007 09:39PM UTC by joern comment:4

resolution: → duplicate
status: newclosed

See #895