> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/traversal/.siblings.md).

# .siblings()

`.siblings()` gets elements that share the same parent as the selected element.

***

#### Syntax

```js
element.siblings();
element.siblings(selector);
```

***

#### Parameters

* `selector` → optional selector to filter the siblings

***

#### Output

```js
HTMLElement | NodeList | HTMLCollection | null
```

***

#### Example

```js
$('.tab.active')
  .siblings('.tab*')
  .removeClass('active');
```

***

#### Key Takeaway

> `.siblings()` is for working with elements beside the current one.
