jQuery :only-child Selector

jQuery Selectors : Select each <p> element that is the only child of its parent

Definition and Usage

The :only-child selector selects every element that is the only child of its parent.

Syntax

$(":only-child")