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
What are the features of jQuery, has been used in web applications?
Define width() vs css('width')?
What is the difference between settimeout() and setinterval() methods?
How to use migrate jquery plugin if possible? : jquery mobile
Explain "beforesend(xhr)" paremeter of jquery ajax method?
How to add and remove css classes to an element using ?
Explain the concepts of "$ function" in jquery with an example?
Why jQuery is needed?
Need to add jQuery file in both Master and Content page?
Can you give me a brief history of your programming days? Where did it all start?
Why should I use jquery?
Explain is jquery replacement of java script? : jquery mobile
Change the url for a hyperlink using jquery?
How to multiple version of jQuery?
What is jquery selectors?