jQuery [attribute*=value]Selector
Examples
Select all <input> elements with a name attribute containing the string "nation":
$("input[name*='nation']")
Try it Yourself »
Definition and Usage
The [attribute*=value] selector selects each element with the specified attribute whose value contains the specified string.
Syntax
$("[attribute*='value']")
| Parameters | Description |
|---|---|
| attribute | Required. Specifies the attribute to look for. |
| value | Required. Specifies the string that the value must contain. |
Other Extensions
jQuery Selectors