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
Tell me does jquery 2.0 supports ie? : jquery mobile
How do you get the attribute of an html tag in jquery?
Define the use of each function in jquery?
What is the minimum setup needed to start using jquery.
What is the difference between "#" and "." selector in JQuery?
Need to add jQuery file in both Master and Content page?
Define cdn in jquery?
Difference Between Prop and Attr in jQuery?
Define jquery connect?
What is eq()? : jquery mobile
Why should I use jquery?
What is the use of serialize method in jQuery?
What are jquery selectors?
What are features of jquery or what can be done using jquery?
Mention some advantages of jquery.