What is the difference between eq() and get() methods in jQuery?
Answer Posted / 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 View All Answers
What is serialize() in jquery?
Explain the concepts of "$ function" in jquery with an example?
How do you select all elements with the class of “selected” in jquery?
Why are not some scripts and styles loading? : jquery mobile
What is the between $(this) and 'this' in jquery?
How to find all sibling elements after the current element using ?
Explain .delegate()? : jquery mobile
Explain url paremeter of jquery ajax method?
Which one is more efficient, document.getElementbyId( "myId") or $("#myId)?
What are the the two types of cdns?
What is jQuery CDN?
What is meant by the term ‘theming’ in jquery mobile? : jQuery Mobile
What is called chaining?
What's next on the hitlist with jquery ui?
Whether C# code behind can be called from jQuery?