Bug Tracker

Modify

Ticket #2068 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

JQuery can't manipulate elements with '$' in ID

Reported by: tIT Owned by:
Priority: critical Milestone: 1.2.2
Component: core Version: 1.2.1
Keywords: Cc:
Blocking: Blocked by:

Description

Example:

<script type="text/javascript">
//<![CDATA[
$(document).ready(function () {
    alert($('#some_$ROOT')); // alerts Object
    $('#some_$ROOT').html('Yo!'); // does nothing
});
//]]>
</script>
<div id="some_$ROOT"></div>}}}

Change History

comment:1 Changed 5 years ago by brandon

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

Selectors with special characters in them must be escaped. You can find more info at this FAQ:  http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

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.