jaywhy13
02-16-2005, 03:37 AM
I've been recently using a lot of highlight functions and by that I mean... say i hav a menu....
=========
|| Menu ||
=========
| 1. Item |
| 2. Item |
| 3. Item |
Summin like that, use ur imagination.... table by the way.. when i hover over it I want to do summin like... change the backgroud color of 1. Item and make it bold
The concern that I have is that there is a slight delay.... I mouse over and it takes like a lil while to come up... the delay is mayb about a second... but still a bit too slow
Current I get it done summin like so:
<html>
.
.
<script>
function highlight(obj)
{
if (obj.style.backgroundColor=white)
{
change the bgcolor and font weighting
}
else if (obj.style.backgroundColor!=white)
{
reset it! make it white and font normal
}
}
</script>
.
<table>
<tr><td onmouseOver=highlight(this) onmouseOut=highlight(this)>1. Item</td></tr>
.
.
.
.
</table>
</html>
Is it a better idea to simply change tha class name? Or is there a more efficient way to get it done? :cool:
=========
|| Menu ||
=========
| 1. Item |
| 2. Item |
| 3. Item |
Summin like that, use ur imagination.... table by the way.. when i hover over it I want to do summin like... change the backgroud color of 1. Item and make it bold
The concern that I have is that there is a slight delay.... I mouse over and it takes like a lil while to come up... the delay is mayb about a second... but still a bit too slow
Current I get it done summin like so:
<html>
.
.
<script>
function highlight(obj)
{
if (obj.style.backgroundColor=white)
{
change the bgcolor and font weighting
}
else if (obj.style.backgroundColor!=white)
{
reset it! make it white and font normal
}
}
</script>
.
<table>
<tr><td onmouseOver=highlight(this) onmouseOut=highlight(this)>1. Item</td></tr>
.
.
.
.
</table>
</html>
Is it a better idea to simply change tha class name? Or is there a more efficient way to get it done? :cool: