Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery :only-of-type Selector

jQuery :only-of-type Selector

jQuery selector jQuery selector

Example

Select the only

element of every

element:

$("p:only-of-type")

Try it »


Definition and Usage

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


Syntax

$(":only-of-type")


jQuery selector jQuery selector