By default, the a.link:active state is shown only for as long as the button on the mouse is pressed. When you let go, it reverts back to the regular a.link state.
How do I make the active state STICK? In other words, in a navigation menu that is permanently on the screen, I want the active state to stick permanently (until another button is pushed).
How is this accomplished?
Thanks!
Consider this code -
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
.foo {
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<p><a id="num1" href="#" onclick="this.className='foo';document.getElementById('num2').classNa me='';">Foo</a></p>
<p><a id="num2" href="#" onclick="this.className='foo';document.getElementById('num1').classNa me='';">Foo</a></p>
</body>
</html>
North America
Europe, Middle East and Africa
Asia Pacific