Hi!
The JavaScript function below fades in the opacity of an image from 0 - 100.
The problem is that it fades too slow. The setTimeout delay is set to 0.
Can anyone help me to speed up this function? VBScript would be just as fine
since this can't be done in NS anyway. I want the image to fade in as
smoothly as possible so changing "i++" to "i=i+2" won't do.
function fadeImage(oImage)
{
if (document.all)
{
oFadeImage = document.images[oImage];
_doFade(oFadeImage, 0)
}
Quote:
}
function _doFade(oFadeImage, i)
{
oFadeImage.filters.alpha.opacity = i;
i++;
if (i < 100) setTimeout("_doFade(oFadeImage, " + i + ")", 0);
Quote:
}
/Thanks, Billy.