Setting CSS pseudo-class rules from JavaScript
You can’t style a pseudo-class on a particular element alone, in the same way that you can’t have a pseudo-class in an inline style=”…” attribute (as there is no selector). You can do it by altering the stylesheet, for example by adding the rule: #elid:hover { background: red; } assuming each element you want to … Read more