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
Tell me how to disable jquery animation? : jquery mobile
Why is not dom ready working for jquery mobile? : jquery mobile
What is the difference between $(this) and 'this' in jquery?
Explain the concepts of "$ function" in jquery with an example?
Where jquery mobile works? : jquery mobile
Hide and show image on button click using jQuery?
Which command will give a version of jQuery?
Explain the difference between javascript and jquery? : jquery mobile
What are all the ways to include jQuery in a page?
Explain the common methods of sending a request to a server.
How to programmatically trigger a click event thats being handled by jquery only?
How we can set the html contents of an element in jquery?
Explain .delegate()? : jquery mobile
What are the effects methods used in jquery?
What is difference between $(this) and ‘this’ in jquery?