Forum Moderators: open
sfHover = function() {
var sfEls = document.getElementById("mainnav").getElementsByTagName("LI");
for (var I=0; I<sfEls.length; I++) {
sfEls[I].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[I].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
var main = document.getElementById("mainnav").getElementsByTagName("LI");
var blue = document.getElementById("bluenav").getElementsByTagName("LI");
var green = document.getElementById("greennav").getElementsByTagName("LI");
var sfEls = main.concat(blue, green);
See where that gets you.
Please excuse the ignorance, but javascript is NOT my forte. What do i take OUT of the code you posted to just use the bluenav and greenanv? I don't want to screw anything up.
var blue = document.getElementById("bluenav").getElementsByTagName("LI");
var green = document.getElementById("greennav").getElementsByTagName("LI");
var sfEls = blue.concat(green);
good luck :)