How to hover on a css ::before element with jQuery?

i have like this

background: red;

How i can get that show with jQuery combine with .click function?


Pseudo elements are not part of the DOM, and jQuery is a DOM manipulation library. So no, not without getting into hack-ey territory.

You can add a class to it on hover with jQuery just fine though, so just do that. Why do you need to use JS for hover though, out of curiousity?