English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Sélecteur :root jQuery

Sélecteurs jQuer

Le sélecteur :root choisit l'élément racine du document (toujours <html>).

Grammaire :

$(':root')

Exemple

Choisir l'élément racine :

$(document).ready(function(){
  $(':root').css('background', 'lightgreen');
});
Voyons un test‹/›

Sélecteurs jQuer