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 |
How to redirect to another page using jquery?
What are the paremeter of jquery ajax method?
Explain the difference between .empty() and .remove() ?
Is it possible to use jquery to make ajax request? : jquery mobile
Hide and show image on button click using jQuery?
Which is the fastest selector in jQuery?
What is event.PreventDefault in jQuery?
Explain the use jquery.data method?
explain width() vs css(‘width’) in jquery
How to check if number is numeric while using jquery 1.7+? : jquery mobile
Jumping off of jquery ui for a second, do you 'release early, release often' with all of your projects? What are your thoughts on that strategy?
How to use connect in jquery?