jQuery :contains()Selector
Definition and Usage
The :contains() selector selects elements that contain the specified string.
The string can be text directly contained in the element, or contained in a child element.
The most common usage: combine it with other selectors to select elements containing the specified text in a specified combination (like the example above).
Note:The text is case-sensitive.
Syntax
$(":contains(text)")
| Parameter | Description |
|---|---|
| text | Required. Specifies the text to search for. |
Other Extensions
jQuery Selectors