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

Technology CommunityCategory: jQueryWhat is the difference between eq() and get() methods in jQuery?
VietMX Staff asked 3 years ago
  • 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.