jQuery [attribute^=value] Seletor

❮ Seletores jQuery

Exemplo

Selecione todos os elementos <input> com um atributo name que comece com "nation":

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

Definição e uso

O seletor [attribute^=value] seleciona cada elemento com um atributo específico, com um valor começando em uma string específica.


Sintaxe

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

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

❮ Seletores jQuery