How to use jquery next() to select next div by class

前端 未结 2 1608
南方客
南方客 2021-02-18 16:09

I\'m fairly new to jquery and struggling with something that should be fairly simple. I want to select the previous and next div with class \"MenuItem\" from the div with class

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-18 17:09

    Have you tried: .parent() and .children() ? http://docs.jquery.com/Traversing

提交回复
热议问题