A table cells flying over effect
This tip enables
the colourisation of table cells when the mouse pointer moves over them. To carry out this effect, insert the following script into the head of your page:
<script language="JavaScript1.2">
function changeto(highlightcolor){
source=event.srcElement
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD")
source=source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}
function changeback(originalcolor){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
return
if (event.toElement!=source)
source.style.backgroundColor=originalcolor
}
</script>
Modify your table tag as follows:
<table onMouseover="changeto('flyover_colour')"
onMouseout="changeback('default_colour')">
Insert the regular code for your table cells here.
</table>
Discover all Webmaster scripts.