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

Seletor de Atributo [attribute] do jQuery

Seletor do jQuer

[ attribute Seletor] é usado para selecionar elementos comAtributo [attribute]Elemento.

Sintaxe:

$("[attribute]")

Exemplo

Selecione cada elemento com o atributo target:

$("document").ready(function(){
  $("[target]").css({"background":"green", "color":"white"});
});
Teste e Veja‹/›

Valor do Parâmetro

ParâmetroDescrição
attributeAtributo do elemento a ser selecionado

Seletor do jQuer