What is wrong with this code line "$('#myid.3').text('blah blah!!!');"
Answer / chaitanya
The problem with above statement is that the selectors is having meta characters and to use any of the meta-characters ( such as !"#$%&'()*+,./:;<=>?@[]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \. For example, an element with id="foo.bar", can use the selector $("#foo\.bar").
So the correct syntax is,
Hide Copy Code
$('#myid\.3').text('blah blah!!!');
| Is This Answer Correct ? | 1 Yes | 1 No |
How to select combobox select value and text using jquery?
Tell me can we have multiple document.ready() function on the same page? : jquery mobile
How to programmatically trigger a click event thats being handled by jquery only?
What is serialize() in jquery?
How to set jquery mobile responsive table width to 100% width despite css styles? : jquery mobile
How can we apply css in div using jquery?
How do you stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements?
How do you select all elements with the class of “selected” in jquery?
Explain jquery $.ajax() method?
How to check variable is empty or not in jquery?
Define slidetoggle() effect?
How to check data type of any variable in jquery? : jquery mobile