jQuery [attribute^=value] Selector (original) (raw)
Last Updated : 11 Jul, 2025
The **jQuery **[attribute^=value] selector is used to select all elements with a given attribute specified by an attribute parameter that starts with the word specified by value parameter.
**Syntax:
$("[attribute^='value']")
**Parameters: This selector contains two parameters which are listed below:
- **attribute: It is used to specify the attributes which need to select (any html element).
- **value: It contains the string from which the value of every selected element's value should start.
**Example 1: This example uses [attribute^=value] selector to select those elements whose class name starts with top.
HTML `
jQuery [attribute^=value] SelectorWelcome to GeeksforGeeks
A Computer Science portal for geeks.
It
contains well written, well thought and well
explained
computer science and
programming articles
Competitive programming is not tough.
Every one should learn Programming.
`
**Output:
**Example 2: This example uses [attribute^=value] selector to select those elements whose class name starts with top.
HTML `
jQuery [attribute^=value] Selector`
**Output:

