jQuery Tutorial Tutorials - jQuery :empty selector

:empty selector

The jQuery :empty selector is used to select the element that has no children or text nodes.It's the inverse of :parent selector.

jQuery :empty selector Syntax

$(':empty')

jQuery :empty selector Examples

Following is a simple example which would find out all elements that don't have child element or text:
Try now

Compare with :parent selector

Try now

Date:2019-08-18 18:42:51 From:www.Lautturi.com author:Lautturi