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 |
Define type paremeter of jquery ajax method?
What is $() in jquery library?
What is the need for jquery? : jQuery Mobile
Is jquery html() method works for both html and xml documents?
Explain jquery.noconflict? : jquery mobile
How can related code be encapsulated? Give example.
What are the paremeter of jquery ajax method?
What are selectors in jquery mean ?
What is the use of noconflict() method in jquery?
Jquery can be used in what scenarios?
How does jquery store data related to an element?
Explain data paremeter of jquery ajax method?