jQuery to get sibling elements

next () adjacent to the next element of the same level

prev() is adjacent to the previous sibling element

siblings() all sibling elements

$("#id").next();
$("#id").prev();
$("#id").siblings();

Guess you like

Origin blog.csdn.net/qq_41353397/article/details/111823211