Selektor jQuery [attribute^=value]

❮ Selektory jQuery

Příklad

Vyberte všechny prvky <input> s atributem name, který začíná „nation“:

$("input[name^='nation']")

Definice a použití

Selektor [attribute^=value] vybere každý prvek se specifickým atributem, jehož hodnota začíná v určitém řetězci.


Syntax

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

Parameter Description
attribute Required. Specifies the attribute to find
value Required. Specifies the string the value should begin with

❮ Selektory jQuery