PDA

View Full Version : OnClick Change Font color



shevi2027
02-20-2006, 08:35 AM
Heyyy

I have the following menu ^^



...
<td width="10%" height="25"><a href="#" onClick="showit(0)" style="text-decoration:none;"><span class="Menu1Title">Home</span></a></td>
<td width="10%" height="25"><a href="#" onClick="showit(1)" style="text-decoration:none;"><span class="Menu1Title">I Servizi</span></a></td>
...


And i use the following style



.Menu1Title {
background-color:#FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #253D56;
letter-spacing: 2px;
text-decoration:none;
}


What i want to do is change the font colour of the menu ONLY when the user clicks on the link (for example Home). And when the user clicks another link (for example Servizi) "Home" should get the normal font colour and "Sercizi" should get the new font colour..

Anyone ???

Thanks

Twey
02-20-2006, 03:55 PM
Use Javascript to change the class of the link when clicked.
I can't be more specific without seeing the full code for the menu.