Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery [attribute] selector

jQuery [attribute] selector

jQuery selector jQuery selector

Example

Select every element with an id attribute:

$("[id]")

Try it »


Definition and Usage

The [attribute] selector selects every element with the specified attribute.


Syntax

$("[

attribute

]")

Parameters Description
attribute Required. Specifies the attribute to look for.

jQuery selector jQuery selector