jQuery difference between :eq() and :nth-child()

前端 未结 8 2352
一个人的身影
一个人的身影 2020-12-02 15:26

In jQuery, what are some of the key differences between using :eq() and :nth-child() to select any elements ?

Also in general, for the starting index, in which case

8条回答
  •  一整个雨季
    2020-12-02 16:06

    eq() starts with 0, while nth-child() starts with 1

    see differences clearly here http://jsfiddle.net/9xu2R/

提交回复
热议问题