sbaaaang sbaaaang - 1 year ago 43
CSS Question

How do I add a new class to an element dynamically?

Is there any way to add a new CSS class to an element on


Like for jQuery, but translated into CSS:


Answer Source

Short answer no :)

But you could just use the same CSS for the hover like so:

a:hover, .hoverclass {

Maybe if you explain why you need the class added, there may be a better solution?