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

Seletores :root do jQuery

jQuer Seletores

O seletor :root escolhe o elemento raiz do documento (sempre <html>).

Sintaxe:

$(':root')

Exemplo

Escolher o elemento raiz:

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

jQuer Seletores