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 |
What is the difference between eq() and get() methods in jQuery?
Tell me which program is useful for testing jquery?
What is the difference between the id selector and class selector in jquery?
How to fetch the values of selected checkbox array using jquery?
Explain slidetoggle() effect.
What is the difference between settimeout() and setinterval() methods?
what is the use of param() method in jquery .
How to use it jquery knockout?
What is queue() in jquery? Use of queue() in jquery?
What is resize() function in jquery?
How do you get the attribute of an html tag in jquery?
Can you use multiple document.ready() function on the same page?