Easy Tutorial
❮ Html After Misc Size ❯

jQuery [attribute|=value] Selector

jQuery Selectors

Example

Select all <p> elements with a title attribute that starts with "Tomorrow":


Definition and Usage

The [attribute|=value] selector selects each element with a specified attribute, where the value is exactly the specified string (e.g., "en") or starts with that string followed by a hyphen (e.g., "en-us").

Tip: This selector is often used for handling language attributes.


Syntax

Parameter Description
attribute Required. Specifies the attribute to look for.
value Required. Specifies the string the attribute value must start with.

More Examples

Handling Language Attributes

jQuery Selectors

❮ Html After Misc Size ❯