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 |
Explain the difference between body onload() and document.ready() function? : jquery mobile
Tell me does jquery 2.0 supports ie? : jquery mobile
How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?
And finally, if you could give one tip to any new budding jquery ui developers, what would it be?
What is the goal of cdn and what are the advantages of using cdn?
Differentiate among .empty() vs .remove() vs .detach() in jquery.
Which operating system is more compatible with jQuery?
Explain slidetoggle() effect.
How to select combobox select value and text using jquery?
How can related code be encapsulated? Give example.
What methods used to provide effects?
How to get attributes of an element using jQuery?