How do I target an HTML query selector element that contains a partial class? or What's the best way

22 Replies, 1940 Views

For targeting an html query selector element with a partial class, `[class*="btn-"]` is the simplest solution.

If you’re working with a lot of dynamic classes, you *could* use regex, but it’s slower and harder to read.

CSS selectors are your best bet—fast and reliable.

Messages In This Thread



Users browsing this thread: 1 Guest(s)