What is wrong with this code line \"$(\'#myid.3\').text(\'blah blah!!!\');\" ?

Answer

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, $('#myid\\.3').text('blah blah!!!');

All JQUERY Questions

Ask your interview questions on jquery

Write Your comment or Questions if you want the answers on jquery from jquery Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---