"NeoPhreak" <ne*@neophreak.com> writes:
This function is called on the onMouseOut even of a table cell for a menu.
I want it to sort of fade out but for some reason i can't get it to work.
If some one could help me out on this one i would greatly appreciate it.
.... setTimeout("return","200");
What is this line supposed to do?
What it actually does is to schedule the execution of the statement
"return" in 200 milliseconds ... which ofcourse does nothing whatsoever.
It doesn't delay execution of the following statements at all (which is
what I guess you wanted it to).
would be called like this:
<td onMouseOut="Out(this);">Something</td>
You function is called "out" with a small "o", but this call is to a
function with a captial "O". Javascript is case sensitive.
Try this:
---
var colors = ["","#011","#022","#033","#066"];
function fade(obj) {
var ctr = colors.length-1;
function fadeStep() {
obj.style.backgroundColor = colors[ctr--];
if (colors<0) {clearInterval(tid);}
}
var tid = setInterval(fadeStep,200);
}
---
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'