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 |
Tell me how to select combobox select value and text using jquery?
differentiate between bind() vs live() vs delegate() methods in jquery.
Is jquery code exicuted on the clientside, or serverside?
Define url paremeter of jquery ajax method?
What is the difference between the id selector and class selector in jquery?
Explain jquery connect?
What are the differences between size and length in jquery?
Tell me how to disable jquery animation? : jquery mobile
Tell me which program is useful for testing jquery?
How to load a page using jquery mobile? : jquery mobile
What is the difference between onclick and onsubmit?
What is the difference between jQuery and jQuery UI?