W
windandwaves
Hi
I have the following html:
<div id="menu">
<div id="m1"><a href="m1.php"><img src="m1.gif" alt="m1"></a></div>
<div id="m2"><a href="m2.php"><img src="m2.gif" alt="m2"></a></div>
<div id="m3"><a href="m3.php"><img src="m3.gif" alt="m3"></a></div>
<div id="m4"><a href="m4.php"><img src="m4.gif" alt="m4"></a></div>
<div id="m5"><a href="m5.php"><img src="m5.gif" alt="m5"></a></div>
</div>
and I want to load on the images (1-5), one at the time, loading one every
0.5 seconds.
I have some thought on how to do this, but i wanted to find the smartest way
function onload() {
for (i=1; i< 6; i++) {
el = getelementbyid('m'.i);
el = el.style.display = "none";
}
for (i=1; i< 6; i++) {
waiter(0.5)
el = getelementbyid('m'.i);
el = el.style.display = "none";
}
function waiter($seconds) {
....???
}
any hints?
I have the following html:
<div id="menu">
<div id="m1"><a href="m1.php"><img src="m1.gif" alt="m1"></a></div>
<div id="m2"><a href="m2.php"><img src="m2.gif" alt="m2"></a></div>
<div id="m3"><a href="m3.php"><img src="m3.gif" alt="m3"></a></div>
<div id="m4"><a href="m4.php"><img src="m4.gif" alt="m4"></a></div>
<div id="m5"><a href="m5.php"><img src="m5.gif" alt="m5"></a></div>
</div>
and I want to load on the images (1-5), one at the time, loading one every
0.5 seconds.
I have some thought on how to do this, but i wanted to find the smartest way
function onload() {
for (i=1; i< 6; i++) {
el = getelementbyid('m'.i);
el = el.style.display = "none";
}
for (i=1; i< 6; i++) {
waiter(0.5)
el = getelementbyid('m'.i);
el = el.style.display = "none";
}
function waiter($seconds) {
....???
}
any hints?