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 |
Tell me can we have multiple document.ready() function on the same page? : jquery mobile
How can related code be encapsulated? Give example.
Is it possible that jquery html work for both html and xml document?
Define width() vs css('width')?
What are the various ajax functions?
What is each() function in jQuery? How do you use it?
Explain finish method in jquery? : jquery mobile
How do I check if an HTML element is empty using jQuery?
What to do to select element having a particular class (".selected")? : jquery mobile
What is $() in jquery library?
Is jQuery is a client or server scripting?
What are jquery plugins?