jQuery :has() Selector
Learn all about the jQuery function :has() Selector.
The expression $( "div:has(p)" )
matches a <div>
if a <p>
exists anywhere among its descendants, not just as a direct child.
Login to join the community
jQuery Cards is a community to share and geek out
about the latest, coolest jQuery plugins
Login with:
We'll never post to Twitter or Facebook without your permission.
A repository of over 1000 quality jQuery plugins
The expression $( "div:has(p)" )
matches a <div>
if a <p>
exists anywhere among its descendants, not just as a direct child.