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!!!');"

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to validate email using jquery?

898


How to check or uncheck all checkboxes using jquery?

836


What is the difference between find and children methods?

876


What is jquery selectors? Give some examples.

865


How we can get the value of a radio button using jquery?

816


Explain the difference between .empty() and .remove() ?

782


What is the difference between onload() and document.ready()?

853


How do I pull a native DOM element from a jQuery object?

853


In what scenarios jQuery can be used?

899


What is $() in jquery library?

872


Explain .on()? : jquery mobile

821


Explain event.preventdefault? : jquery mobile

839


Tell me does jquery 2.0 supports ie? : jquery mobile

755


List the advantages of jquery?

772


What is the difference between jquery-x.x.x.js and jquery.x.x.x min.js?

830