What is the difference between eq() and get() methods in jQuery?



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

Post New Answer

More jQuery Interview Questions

Explain chaining in jquery? : jquery mobile

0 Answers  


Which command will give a version of jQuery?

0 Answers  


Can you please explain the difference between .js and .min.js? : jquery mobile

0 Answers  


Explain event.preventdefault? : jquery mobile

0 Answers  


What are selectors in jquery?

0 Answers  






Define animate function in jquery?

0 Answers  


Tell me how to select combobox select value and text using jquery?

0 Answers  


How to add and remove css classes to an element using ?

0 Answers  


Whether our own specific characters are used in place of $ in jQuery?

0 Answers  


What is parent() in jquery?

0 Answers  


What is the difference between $(this) and 'this' in jquery?

0 Answers  


Explain the animate function.

0 Answers  


Categories