attributeHas selector
Description: Selects elements that have the specified attribute, with any value.
-
version added: 1.0jQuery( "[attribute]" )
attribute: An attribute name.
Example:
Bind a single click to divs with an id that adds the id to the div's text.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
|