What is the difference between eq() and get() methods in jQuery?
Answer Posted / 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 |
Post New Answer View All Answers
How to redirect to another page using jquery?
Why do we need to go for JQuery?
What is meant by the term ‘theming’ in jquery mobile? : jQuery Mobile
How you get server response from an ajax request using jquery?
Tell me do I need to add the jquery file both at the master page and content page as well?
What is .empty()? : jquery mobile
How to use transition effects? : jQuery Mobile
Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?
What is jQuery connect?
In what scenarios jQuery can be used?
How to select class in jquery?
Is jquery still relevant 2019?
what are the features of jquery
Where jQuery code is getting executed?
What is method chaining in jquery and what are the advantages?