jQuery Intro

jQuery Intro Quiz

jQuery Intro Exercise

jQuery Basic

jQuery Basic Quiz

jQuery Basic Exercise

jQuery Advance

jQuery Advance Quiz

jQuery Advance Exercise

jQuery Selectors

jQuery Effects

jQuery Events

jQuery Methods and Properties

jQuery Traversing

jQuery CSS and HTML Methods

jQuery siblings() Method

jQuery siblings() Method



The siblings() method is used to return all sibling elements of the selected element. Sibling elements are those elements that have the same parent. It traverses in both directions i.e, forward and backward along with siblings of the DOM elements.
Similar methods like it are prev() and next() but both of these methods move in one direction.




Its syntax is:- $(selector).siblings(filter)


Further Explanation:-


Parameter Description
filter Optional. Specifies a selector expression to narrow down the search for sibling elements

Code Explanation

All Tutorials related to jQuery Traversing

All Sections related to jQuery