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 can you select all elements in a page using jquery?
Explain jquery.noconflict? : jquery mobile
What is the difference between prop and attr?
What is the latest version of jquery?
How to create, read and delete cookies with jquery?
Explain the difference between jquery.size() and jquery.length?
How to add and remove css classes to an element using jquery?
Why should I use jquery?
Tell me what does dollar sign ($) means in jquery? : jquery mobile
How do you select an item using css class or id and get the value by use of jquery.
What is jquery toggle function?
How you will use jquery means requirement needed for using jquery.