Skip to main content

Bug Tracker

Side navigation

#989 closed bug (invalid)

Opened February 22, 2007 03:16PM UTC

Closed February 22, 2007 09:48PM UTC

Last modified June 19, 2007 09:54AM UTC

#-starting IDs are not found in the page

Reported by: dialtone Owned by:
Priority: major Milestone: 1.1.2
Component: core Version: 1.1.1
Keywords: Cc:
Blocked by: Blocking:

$('<li id="#foo">hi</li>').appendTo("body"); $("##foo")

Doesn't find the just added li item.

Attachments (0)
Change History (3)

Changed February 22, 2007 05:37PM UTC by aercolino comment:1

# is not a valid id starter: ''When defining fragment identifiers to be backward-compatible, only strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be used''


Changed February 22, 2007 09:48PM UTC by john comment:2

resolution: → invalid
status: newclosed

aercolino is correct. We only accept IDs that are valid both in HTML documents and for CSS selectors.

Changed February 22, 2007 11:14PM UTC by aheimlich comment:3

Replying to [comment:2 john]:

Just to clarify, this means that you should should not use #, ., or : in your IDs as they are a part of CSS selector syntax, so the pattern becomes this: