Javascript and looping through an attached css

How do I query classes on an attached css that start with class and a pseudo class? I know I need to start by finding the code in the css, defining that variable then creating a for loop to run through array it creates. But I am stuck on this. I tried, getComputedStyle(’.fa’, ‘:before’); but this came up with errors.

I wanted to write javascript but is this a job for jquery?

How about document.querySelector()?

1 Like