Hey! The `[class*="btn-"]` approach you mentioned is actually one of the cleanest ways to target an html query selector element that contains a partial class.
If you wanna get fancy, you could use `document.querySelectorAll('[class^="btn-"]')` to target classes that *start* with "btn-".
Regex might be overkill unless you're dealing with super complex patterns. Stick with CSS selectors—they’re fast and readable.
Check out MDN’s guide on attribute selectors for more tricks!
If you wanna get fancy, you could use `document.querySelectorAll('[class^="btn-"]')` to target classes that *start* with "btn-".
Regex might be overkill unless you're dealing with super complex patterns. Stick with CSS selectors—they’re fast and readable.
Check out MDN’s guide on attribute selectors for more tricks!
