Is there any way to add a new CSS class to an element on :hover
?
Like for jQuery, but translated into CSS:
$(element).addClass('someclass');
Short answer no :)
But you could just use the same CSS for the hover like so:
a:hover, .hoverclass {
background:red;
}
Maybe if you explain why you need the class added, there may be a better solution?