jQuery [Attribut$=Wert] Selektor
Beispiel
Wählen Sie alle <a>-Elemente mit einem href-Attribut aus, das auf „.org“ endet:
$("a[href$='.org']")
Definition und Verwendung
Der Selektor [attribute$=value] wählt jedes Element mit einem bestimmten Attribut aus, dessen Wert mit einer bestimmten Zeichenfolge endet.
Syntax
$("[attribute$='value']")
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to find |
value | Required. Specifies the string the value should end with |