Bug Tracker

Modify

Ticket #10164 (closed bug: worksforme)

Opened 21 months ago

Last modified 21 months ago

jQuery fails to grab an element by id if the id contains the "+" chars

Reported by: reda.abdi@… Owned by:
Priority: low Milestone: None
Component: selector Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

While jQuery fails to grab an element by id if the id contains the "+" chars, the document.getElementById() function works and grab the element.

Thanks

Change History

comment:1 Changed 21 months ago by addyosmani

  • Priority changed from undecided to low
  • Resolution set to worksforme
  • Status changed from new to closed
  • Component changed from unfiled to selector

As per our docs: 'If you wish to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[\]`{|}~ ) as a literal part of a name, you must escape the character with two backslashes:
'. Please see below for a jsFiddle using + in a selector working fine using two backslashes:  http://jsfiddle.net/6BdDZ/

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.