A repository of over 1000 quality jQuery plugins

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.