Const
Get the siblings of each element (excluding the element) in the set of matched elements, optionally filtered by a selector.
Optional
If specified filter for siblings.
The siblings.
$('.pear').siblings().length;//=> 2$('.pear').siblings('.orange').length;//=> 1 Copy
$('.pear').siblings().length;//=> 2$('.pear').siblings('.orange').length;//=> 1
https://api.jquery.com/siblings/
Get the siblings of each element (excluding the element) in the set of matched elements, optionally filtered by a selector.