The following code is supposed to gently vary the color of a tab, which i pass into the function. However, the gradient only increases every new time that i enter the tab, instead of increasing the one time i put the mouse over...
<script type = "text/javascript">
hex=255;
function fadetext(element){
if(hex>0) {
hex-=11;
element.style.backgroundColor="rgb("+hex+","+hex+","+hex+")";
setTimeout("fadetext(element)",50);
}
else
hex=255;
}
</script>
<div id="tabs">
<ul>
<li><a href="tab-frame-css.html" class="selected" target="mainFrame" onMouseOver = "fadetext(this)" onclick="loadit(this)">Personal details</a></li>
</ul>
</div>