Reputation: 620
Can I toggle the 'active' status of an element to invoke css a:active
properties?
Upvotes: 1
Views: 3819
Reputation: 20235
If you hold your mouse down on the anchor element (or any element), it will invoke the active property. If you want to do this dynamically (in JavaScript), you can create a class, a.active
, and add/remove "active"
from the className property on the dom element.
Upvotes: 1