Skip to content
Related Articles

Related Articles

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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :