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 to do to select element having a particular class (".selected")? : jquery mobile
Different ways of using $.connect function in jquery?
How to read cookies in jquery?
Explain "beforesend(xhr)" paremeter of jquery ajax method?
Where jquery mobile works? : jquery mobile
What is the difference between jquery-x.x.x.js and jquery.x.x.x min.js?
Write a code for the implementation of a module pattern.
Tell me is jquery a library for client scripting or server scripting? : jquery mobile
Where can we download JQuery?
What is eq()? : jquery mobile
Explain the difference between find and children methods in jquery?
What are the the two types of cdns?
What are selectors in jquery?
How to set attributes of an element using jquery?
Is jquery is json library file or a javascript?