Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

jQuery | :parent Selector

  • Last Updated : 26 Feb, 2019

The :parent selector in jQuery is used to select all elements that are the parent of another element, including text nodes.




<!DOCTYPE html>
      jQuery :parent() Selector
    <script src=
        $(document).ready(function() {
              "background-color", "green");
        <h1 id="geeks1">
        <h2 id="geeks2">
          jQuery :parent() Selector


Supported Browsers: The browser supported by jQuery :parent Selector are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!