Modify ↓
Ticket #10164 (closed bug: worksforme)
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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/