jQuery [atrybut^=wartość] Selektor

❮ Selektory jQuery

Przykład

Wybierz wszystkie elementy <input> z atrybutem nazwy zaczynającym się od „nation”:

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

Definicja i użycie

Selektor [atrybut^=wartość] wybiera każdy element z określonym atrybutem, którego wartość zaczyna się od określonego ciągu.


Składnia

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

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

❮ Selektory jQuery