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

Which is fast document.getElementByID('txtName') or $('#txtName').?

Answer Posted / chaitanya

Native JavaScipt is always fast. jQuery method to select txtName "$('#txtName')" will internally makes a call to document.getElementByID('txtName'). As jQuery is written on top of JavaScript and it internally uses JavaScript only So JavaScript is always fast.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between $(this) and 'this' in jquery?

856


What does jQuery data() function do?

861


How to add or remove classes to an element in jquery?

756


How to add a class to html element?

833


What are the different ways of using $.connect function in jquery?

824


Create a plugin that would add and remove a class on hover.

794


How can events be prevented to work after an ajax request?

767


How to find grand children in of an element?

816


Define jquery connect?

919


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

732


Explain the script build up by jquery?

9330


What are the paremeter of jquery ajax method?

811


How can we show and hide an element via jquery?

800


How to use transition effects? : jQuery Mobile

825


What is cdn and how jquery is related to it?

807