Skip to content
Robbie Chipka edited this page Dec 23, 2015 · 1 revision

The :contains selector filters nodes whose contents contain the string provided in the first argument. For case-insensitive searching, use :icontains instead.

Usage

document.querySelector('a:contains("Home")');

document.querySelector('a:icontains("hOMe")');
Clone this wiki locally