jQuery :only-of-type Selector

❮jQueryセレクター

親の唯一の<p>要素である各<p>要素を選択します。

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

定義と使用法

:only-of-typeセレクターは、そのタイプの唯一の子である、その親のすべての要素を選択します。


構文

$(":only-of-type")

❮jQueryセレクター