jQuery element ~ siblings Selector
Example
Select
all siblings of the ... element
element:
$("div ~ p")
Try it »
Definition and Usage
The ("element ~ siblings") selector selects all elements that are siblings of the specified "element".
For example:
- $("div ~ p") - Select the
all siblings of the ... element
.
**Note:** The two specified elements share the same parent element.
Syntax
("
element
~
siblings
")
| Parameters | Description |
|---|---|
| element | Required. Any valid jQuery selector. |
| siblings | Required. Specifies a element siblings of the ... parameter. |
jQuery selector