What is the difference between eq() and get() methods in jQuery?
Answer / chaitanya
eq() returns the element as a jQuery object. This method constructs a new jQuery object from one element within that set and returns it. That means that you can use jQuery functions on it.
get() return a DOM element. The method retrieve the DOM elements matched by the jQuery object. But as it is a DOM element and it is not a jQuery-wrapped object. So jQuery functions can't be used. Find out more here.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between $(window).load and $(document).ready?
What is the purpose of jquery?
How does jquery mobile theming work? : jquery mobile
How to get/set the html contents of an element using jQuery?
How to check variable is empty or not in jquery?
What does the jQuery migrate function do?
Can you please explain the difference between javascript and jquery? : jquery mobile
How can we apply css in last child of parent using jquery library?
What is the starting point of code execution in jquery?
Explain the use of each function in jquery?
How to check or uncheck all checkboxes using jquery?
What is the use of clone method in jQuery?