BigBison
04-15-2005, 02:14 AM
I have these tags, and I need to loop through them:
<li id="nav1">
<li id="nav2">
<li id="nav3">
Is this the correct code? I'm not certain about the "nav[i+1]" bit.
for (i=0; i<3; i++) {
x = document.getElementById("nav[i+1]");
this.className+=" over";
}
<li id="nav1">
<li id="nav2">
<li id="nav3">
Is this the correct code? I'm not certain about the "nav[i+1]" bit.
for (i=0; i<3; i++) {
x = document.getElementById("nav[i+1]");
this.className+=" over";
}
