How to implement “prevUntil” in Vanilla JavaScript without libraries?

前端 未结 7 900
遇见更好的自我
遇见更好的自我 2020-12-29 11:32

I need to implement the functionality of jQuery\'s prevUntil() method in Vanilla JavaScript.

I\'ve got several

elements on the same level:
相关标签:
7条回答
  • 2020-12-29 12:11

    There is a previousSibling property in the HTML DOM

    Here is some reference

    http://reference.sitepoint.com/javascript/Node/previousSibling

    0 讨论(0)
提交回复
热议问题