YouTip LogoYouTip

Sel Previous Siblings

# jQuery element ~ siblings Selector [![Image 3: jQuery Selectors](#) jQuery Selectors](#) ## Example Selects all `

` elements that are siblings of `

` elements: ```javascript $("div ~ p") [Try it yourself Β»](#) * * * ## Definition and Usage The `("element ~ siblings")` selector selects all elements that are siblings of a specified "element". For example: * **$("div ~ p")** - Selects all `

` elements that are siblings of `

` elements. **Note:** The two specified elements must share the same parent element. * * * ## Syntax ```javascript ("element ~ siblings") | Parameter | Description | | :--- | :--- | | _element_ | Required. Any valid jQuery selector. | | _siblings_ | Required. Specifies the siblings of the _element_ parameter. | * * jQuery Selectors](#)
← Sel Attribute Equal ValueSel Previous Next β†’

YouTip © 2024-2026 | Home | Learn Technology, Build Dreams!

All content is for educational and learning purposes only.