Latest web development tutorials

jQuery [attribute $ = value] Selector

jQuery selector jQuery selector

Examples

To select all with ".org" at the end of the href attribute <a> elements:

$("a[href$='.org']")

try it"

Definition and Usage

[Attribute $ = value] selector to select each and end with the specified string element with the specified attributes.


grammar

$("[attribute$='value']")

参数 描述
attribute 必需。规定要查找的属性。
value 必需。规定属性值以其结尾的字符串。


jQuery selector jQuery selector