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...

How do you select element by ID in jQuery?

Answer Posted / chaitanya

To select element use ID selector. We need to prefix the id with "#" (hash symbol). For example, to select element with ID "txtName", then syntax would be,

Hide Copy Code

$('#txtName')

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Jumping off of jquery ui for a second, do you 'release early, release often' with all of your projects? What are your thoughts on that strategy?

792


Explain the basic need to start with jquery? : jquery mobile

747


What is the difference between "#" and "." selector in JQuery?

904


Explain finish method in jquery? : jquery mobile

870


Which program is useful for testing jQuery?

830


What is jquery.holdready() function?

821


Why is not dom ready working for jquery mobile? : jquery mobile

752


How to use transition effects? : jQuery Mobile

793


How we can check if an element is empty or not using jquery?

740


How to use css() in jquery?

814


How we can remove an attribute of an html tag in jquery?

750


Explain remove class jquery with example?

771


Can you please explain the difference between prop and attr? : jquery mobile

705


Please explain remove class jquery with example?

869


Explain deferred and promise object in jquery? : jquery mobile

770