Easy Tutorial
❮ Prop Jquery Fx Interval Jquery Chaining ❯

jQuery [attribute~=value] Selector

jQuery Selectors

Example

Select all <input> elements with a name attribute containing the word "nation":


Definition and Usage

The [attribute~=value] selector selects every element with a specified attribute whose value contains a specified word.

Tip: The word can contain spaces.


Syntax

Parameter Description
attribute Required. Specifies the attribute to look for.
value Required. Specifies the word the value should contain.

jQuery Selectors

❮ Prop Jquery Fx Interval Jquery Chaining ❯