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 do you check if an element is empty?
Define bind() and unbind elements in jQuery?
How you will use jquery means requirement needed for using jquery.
What are the difference between alert() and confirm()?
How to control page titles in jquery mobile? : jquery mobile
What is jQuery UI?
Hide and show image on button click using jQuery?
How can jquery library be added to pages?
Tell me what is the use of .size() method in jquery?
Tell me how to check if number is numeric while using jquery 1.7+? : jquery mobile
What is the use of each function in jQuery?
How JavaScript and jQuery are different?