Drop-down menu written in Javascript not working in IE6
-
Hi all, I have a drop down menu that's written in JS. It's working on IE7, Opera, and FireFox. But when i test it on IE6 i found that it's not working. i don't know why. there's no error occured, it just disabled. I checked security settings and aslo JS in enabled but i don't know why it doesn't work :( Here is the JS sfHover = function() { if (document.all && document.getElementById) { sfEls = document.getElementById("nav"); for (i=0; i < sfEls.childNodes.length; i++) { node = sfEls.childNodes[i]; if (node.nodeName=="LI") { node.onmouseover=function() { this.className+=" over"; this.getElementsByTagName("UL")[0].style.visibility="visible" } node.onmouseout=function() { this.className=this.className.replace(" over", ""); this.getElementsByTagName("UL")[0].style.visibility="hidden" } } } } } window.onload=sfHover;