Find the next element that is not immediate?

前端 未结 6 1399
-上瘾入骨i
-上瘾入骨i 2020-12-17 09:27

I want to find the first span element after class counter, in code something like this:

6条回答
  •  不知归路
    2020-12-17 09:51

    Similar to the marked answer but looks a little cleaner using the :first selector:

    $('.counter').nextAll('span:first')
    

提交回复
热议问题