Select Elements Having Inner Child or Text $(":parent")

$(":parent")

e.g. $("div:parent")

$(":parent") selects each "parent" element i.e. has at least one child or text content.

For example, $("div:parent") will find <div> elements that have at least one inner element child or text.

<div> // parent
 <p>child element</p>
</div>
    
<div>text</div> // parent 
    
<div></div> //not parent
jQuery selector filter $(":parent")