jQuery : eq() vs get()

前端 未结 8 1230
挽巷
挽巷 2020-11-28 03:50

I\'m new to jQuery, and I\'m wondering what the difference is between jQuery\'s get() and eq() functions. I may misunderstand what the get()

8条回答
  •  不知归路
    2020-11-28 04:23

    get() returns a DOM element whereas :eq() and eq() return a jQuery element. Since DOM elements have no method fadeIn() it fails.

    http://api.jquery.com/get/

    Description: Retrieve the DOM elements matched by the jQuery object.

    http://api.jquery.com/eq-selector/

    Description: Select the element at index n within the matched set.

提交回复
热议问题