Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



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

Post New Answer

More jQuery Interview Questions

Tell me how to select combobox select value and text using jquery?

0 Answers  


differentiate between bind() vs live() vs delegate() methods in jquery.

0 Answers  


Is jquery code exicuted on the clientside, or serverside?

0 Answers  


Define url paremeter of jquery ajax method?

0 Answers  


What is the difference between the id selector and class selector in jquery?

0 Answers  


Explain jquery connect?

0 Answers  


What are the differences between size and length in jquery?

0 Answers  


Tell me how to disable jquery animation? : jquery mobile

0 Answers  


Tell me which program is useful for testing jquery?

0 Answers  


How to load a page using jquery mobile? : jquery mobile

0 Answers  


What is the difference between onclick and onsubmit?

0 Answers  


What is the difference between jQuery and jQuery UI?

2 Answers  


Categories