Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery | element ~ siblings Selector

  • Last Updated : 11 Mar, 2019

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


("element ~ siblings")

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

  • element: It is required parameter and used for any valid jQuery selector.
  • siblings: It is required parameter and used for specifying the siblings of the element parameter.


<!DOCTYPE html>
          jQuery element ~ siblings Selector
    <body style="text-align:center;">
        <h1 style="color:green;">
            jQuery element ~ siblings Selector
        <script src=
                $("div ~ p").css("background-color", "green");


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!