Hi,
I have a javascript code that rotates a bunch of images, and I am trying to get it to fade in between images, but I can not get the fade to work. It just ignores my fade function, please help. Here is my code:
Code:var imgs = new Array(); var imgcnt = 0; var thisimg = 0; imgs[imgcnt++] = 'images/sternd1.gif'; imgs[imgcnt++] = 'images/sternd2.gif'; imgs[imgcnt++] = 'images/sternd3.gif'; var imgid = document.getElementById('rotimg'); function fadeOut() { imgid.style="filter:alpha(opacity=25);-moz-opacity:.25;opacity:.25;"; } function rotate() { if (document.images) { if (thisimg >= imgcnt) thisimg = 0; document.rotimg.src = imgs[thisimg]; thisimg++; setTimeout("rotate();fadeOut();",10000); } } setTimeout("rotate();",0);
Here is a link to the page with the working rotation but not fade http://www.upc.org/stewardshiprot.aspx?id=44
Thanks in advance for you help.
Kevin


Reply With Quote
Bookmarks