Javascript poniżej bierze wszystkie li z listy i:
- po najechaniu ma zastępować nazwę klasy unselected na DISunselected
- po zjechaniu ponownie ma wymienić klase DISunselected na unselected
I... niestety ale w FF za nic nie chce działać :/
Za to w IE wszystko gra...
Bardzo bym prosił o sugestie co jest źle.
<head> <script type="text/javascript"> sfHover = function() { var sfEls = document.getElementById("navbar").getElementsByTagName("li"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className=this.className.replace('unselected','DISunselected'); } sfEls[i].onmouseout=function() { this.className=this.className.replace('DISunselected','unselected'); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); </script> </head> <body> <ul id="navbar"> <!-- The strange spacing herein prevents an IE6 whitespace bug. --> <ul class="selected"> </ul> </li> </li> </li> </li> </li> </ul> </body>