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

jQuery [attribute] Attribute Selector

jQuery Selectors

[ attribute Selector is used to select elements with specifiedThe [attribute] of the attributeElement.

Syntax:

$("[attribute]")

Example

Select each element with the target attribute:

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

Parameter Value

ParameterDescription
attributeSpecify the attributes of the elements to be selected

jQuery Selectors