How to use Wildcard Selector for Element Visibility Trigger?

Hello,

the visibility of various HTML elements should be tracked. All elements have a specific CSS class like myclass-element-1, myclass-element-2, myclass-element-3 and so on (these classes cannot be changed).

When setting up the element visibility trigger with selection method: CSS selector and defining a specific class, the trigger works as expected.

But because of the huge amount of elements I’m trying to use a wildcard selector to match all classes starting with myclass-. I tried [class^="myclass-"] but then the trigger doesn’t execute.

Is there anything wrong with my wildcard or the specific syntax? Even any other solution to achieve the same goal would be helpful.

Thanks

1 Like

I have a similar problem with classes and id:s.
Can one use regex to match css selectors in the first place?