jQuery [attribuut^=waarde] Selector

❮ jQuery-kiezers

Voorbeeld

Selecteer alle <input>-elementen met een naamattribuut dat begint met "nation":

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

Definitie en gebruik

De [attribuut^=waarde] selector selecteert elk element met een specifiek attribuut, met een waarde die begint in een specifieke string.


Syntaxis

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

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

❮ jQuery-kiezers