div-Tags einblenden

horrst

Grünschnabel
Hallo,
möchte nach der Funktion die Bilder zeigt zwei Div's einblenden. Aber wie?
Code:

Javascript:
var b = new Array();
b[0] = new Image(); b[0].src = "images/logo/logo2_2.gif";
b[1] = new Image(); b[1].src = "images/logo/logo2_3.gif";
b[2] = new Image(); b[2].src = "images/logo/logo2_4.gif";
b[3] = new Image(); b[3].src = "images/logo/logo2_5.gif";
b[4] = new Image(); b[4].src = "images/logo/logo2_6.gif";
b[5] = new Image(); b[5].src = "images/logo/logo2_7.gif";
b[6] = new Image(); b[6].src = "images/logo/logo2_8.gif";
b[7] = new Image(); b[7].src = "images/logo/logo2_9.gif";
b[8] = new Image(); b[8].src = "images/logo/logo2_10.gif";
b[9] = new Image(); b[9].src = "images/logo/logo2_11.gif";
b[10] = new Image(); b[10].src = "images/logo/logo2_12.gif";
b[11] = new Image(); b[11].src = "images/logo/logo2_13.gif";
b[12] = new Image(); b[12].src = "images/logo/logo2_14.gif";
var i = 0;
function Animation () {
  if (i > 12)
    i = 12;
  document.images[0].src = b[i].src;
  i = i + 1;
  window.setTimeout("Animation()", 500);
}

window.setTimeout("Animation()", 500);
 
Code:
<style type="text/css">
#a, #b {visibility: hidden}
</style>

function Animation () {
  if (i > 12)
{
    i = 12;
    document.getElementById("a").style.visibility = "visible";
    document.getElementById("b").style.visibility = "visible";
}
  document.images[0].src = b[i].src;
  i = i + 1;
  window.setTimeout("Animation()", 500);
}

<div id="a"></div>
<div id="b"></div>

Wenn ich das richtig verstanden habe ...

MfG, Thomas D.
 

Neue Beiträge

Zurück