Stephen
Stephen

Reputation: 620

A Tag active Attribute

Can I toggle the 'active' status of an element to invoke css a:active properties?

Upvotes: 1

Views: 3819

Answers (1)

Will
Will

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

Related Questions