Jquery Selecting siblings
To select siblings of an item you can use the .siblings() method.
A typical example where you want to modify the siblings of an item is in a menu:
When the user clicks on a menu item the selected class should be added to the clicked element and removed from its siblings:
The method takes an optional selector argument, which can be used if you need to narrow down the kinds of siblings you want to select: