jQuery element ~ siblings Selector (original) (raw)

Last Updated : 11 Jul, 2025

The element ~ siblings selector in jQuery is used to select all elements that are siblings of the specified element.

Syntax:

("element ~ siblings")

Parameter: It contains two parameters as mentioned above and described below:

Example 1:

HTML `

jQuery element ~ siblings Selector

GeeksforGeeks

jQuery element ~ siblings Selector

Geeks1

Geek2

Geeks3

Geek4

Geeks5

Geek6

`

Output:

Example 2:

HTML `

jQuery element ~ siblings Selector

GeeksforGeeks

jQuery element ~ siblings Selector

Geeks1

Geek2

Geeks3

Geek4

Geeks5

Geek6

`

Output: