Смежные селекторы (“prev + next”)


next adjacent selector

Описание: Selects all next elements matching "next" that are immediately preceded by a sibling "prev".

  • Добавлен в версии: 1.0jQuery( "prev + next" )

    prev: Any valid selector.

    next: A selector to match the element that is next to the first selector.

One important point to consider with both the next adjacent sibling selector (prev + next) and the general sibling selector (prev ~ siblings) is that the elements on either side of the combinator must share the same parent.