The hide-if-contains snippet hides any HTML element (or its ancestors) that match a CSS selector if the element's text contains a given string.

You can use hide-if-contains to hide elements based on their text content.


Filter examples

The following table lists examples that use the hide-if-contains snippet:

Last updated