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 is each() function in jQuery? How do you use it?
What are features of jquery or what can be done using jquery?
Why is not dom ready working for jquery mobile? : jquery mobile
What is the difference between find and children methods in jquery?
Is numeric in jquery?
What is event.PreventDefault in jQuery?
Define bind() and unbind elements in jQuery?
Explain the starting point of code execution in jquery? : jquery mobile
What are the advantages of jQuery?
Define the types of selectors in jquery?
Difference between detach and remove? : jQuery Mobile
Define data paremeter of jquery ajax method?
What are the guidelines for an application to follow the principles of progressive enhancement.
Tell me is jquery a library for client scripting or server scripting? : jquery mobile
Whether C# code behind can be called from jQuery?