Return to Snippet

Revision: 24650
at March 8, 2010 02:39 by cfleschhut


Initial Code
function fade(step) {
    var imgs = document.getElementsByTagName("img");
    step = step || 0;
    imgs[1].style.opacity = step/100;
    imgs[1].style.filter = "alpha(opacity=" + step + ")";
    step += 2;
    if (step <= 100) {
        setTimeout(function() {
            fade(step);
        }, 1);
    }
}

Initial URL
http://jsfiddle.net/eXp5j/5/

Initial Description
adapted from:
[http://aktuell.de.selfhtml.org/artikel/javascript/fader-framework/bilderslideshow.htm](http://aktuell.de.selfhtml.org/artikel/javascript/fader-framework/bilderslideshow.htm)

Initial Title
Basic JavaScript Image Fading

Initial Tags
javascript, image, animation

Initial Language
JavaScript