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



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

Answer / 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

More jQuery Interview Questions

Which is the starting point of code execution in jQuery?

1 Answers  


What is jQuery CDN?

0 Answers  


what does $("div") will select? : jquery mobile

0 Answers  


How can you add a jquery library in your project?

0 Answers  


What were the biggest challenges of getting the 1.7 release out there?

0 Answers  






How to revert the most recent ‘destructive’ operation, changing the set of matched elements to its previous state using ?

0 Answers  


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

0 Answers  


What is the between $(this) and 'this' in jquery?

0 Answers  


What is event.stoppropagation? : jquery mobile

0 Answers  


What is jQuery code to select all links in first paragraph?

0 Answers  


How do you select an item using css class or id and get the value by use of jquery.

0 Answers  


How do you stop the currently-running animation? : jquery mobile

0 Answers  


Categories