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 does jquery store data related to an element?
Write a basic jquery code?
What are the guidelines for an application to follow the principles of progressive enhancement.
What is a jquery ajax?
How to stop jqm from auto-enhancing an element? : jquery mobile
What is jquery mobile theming? : jquery mobile
What are selectors in jquery? Explain
What is the difference between event.PreventDefault and event.stopPropagation?
How to prevent Right Click option using jquery?
What is queue() in jquery?
What is the difference between onload() and document.ready()?
What is the method used to define the specific character in place of $ sign?