Bug Tracker

Modify

Ticket #6665 (closed feature: invalid)

Opened 3 years ago

Last modified 3 years ago

Selector problem

Reported by: Beho Double Owned by:
Priority: Milestone:
Component: selector Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

$("#test-test") works

$("#test,test") works

$("#test.test") works

$("#4-4") works

$("#4,4") doesn't work

$("#4.4") doesn't work

while

getElementById("4,4") works

getElementById("4.4") works

Change History

comment:1 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

You need to escape the comma with
in the string.

BTW, a number alone is not a valid id, and a comma in an id is not valid either. But jQuery will allow you to include it by escaping with backslash.

 http://www.w3.org/TR/html4/types.html#h-6.2

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.