:empty
selectorThe jQuery :empty
selector is used to select the element that has no children or text nodes.It's the inverse of :parent
selector.
:empty
selector Syntax$(':empty')
:empty
selector ExamplesFollowing is a simple example which would find out all elements that don't have child element or text:
Try now
Compare with :parent
selector