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

Why do we need to go for JQuery?

0 Answers  


What is the difference between onload() and document.ready() function used in jquery?

0 Answers  


How to disable jquery animation? : jquery mobile

0 Answers  


How To Use Ajax In Jquery?

0 Answers  


How to run an event handler only once in jQuery?

0 Answers  






How to execute jQuery code after the DOM is ready?

0 Answers  


What programming language does jquery use?

0 Answers  


Back onto jquery ui' can you see jquery ui making more of an impression in the future, lead by the current successes of jquery?

0 Answers  


What is the use jQuery.data method?

0 Answers  


How to check data type of any variable in jquery? : jquery mobile

0 Answers  


How to select combobox select value and text using jquery?

0 Answers  


How you get server response from an ajax request using jquery?

0 Answers  


Categories