jQuery: The Write Less, Do More JavaScript Library

Ticket #2068 (closed bug: worksforme)

Opened 8 months ago

Last modified 8 months ago

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

Reported by: tIT Assigned to: anonymous
Type: bug Priority: critical
Milestone: 1.2.2 Component: core
Version: 1.2.1 Keywords:
Cc: Needs: Review

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>}}}

Attachments

Change History

Changed 8 months 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

Note: See TracTickets for help on using tickets.