Find the next element that is not immediate?

前端 未结 6 1398
-上瘾入骨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:49

    I think the siblings() function is what you are looking for. Try something like this:

    $(".counter").siblings("span");
    

提交回复
热议问题