English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
:only-child sélectionne chaque élément qui est l'unique enfant de son élément parent.
Syntaxe :-$(":only
Sélectionnez chaque élément <p> qui est le seul enfant de son parent :
$(document).ready(function(){ $("p:only-child").css("background", "coral"); });Vérifiez le test‹/›