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 are the two types of CDNs?
How to multiple AJAX requests be run simultaneously in jQuery?
What is eq()? : jquery mobile
How to add and remove css classes to an element using ?
What is jquery.size()? : jquery mobile
How to find all sibling elements in front of the current element using ?
How to check if number is numeric while using jquery 1.7+? : jquery mobile
Define jquery connect?
Consider a scenario where things can be done easily with javascript, would you still prefer jQuery?
Which version of jquery file should be used?
What are the difference between alert() and confirm()?
What is the use of jQuery.data() method?