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 |
What features of jquery, has been used in web applications?
What are the approaches of extracting a query string with regular expressions?
What does the jQuery migrate function do?
How to create, read and delete cookies with jquery?
How to get the style property of an element using ?
What is .bind()? : jquery mobile
Tell me how to check if number is numeric while using jquery 1.7+? : jquery mobile
How can you delay document.ready until a variable is set?
Can we call C# code behind using jQuery?
Explain the script build up by jquery?
What is jQuery code to select all links in first paragraph?
How do you disable or enable a form element?