Posted By

iTony on 02/09/08


Tagged

javascript tags hover


Versions (?)

Suckerfish hover


 / Published in: JavaScript
 

URL: http://www.htmldog.com/articles/suckerfish/dropdowns/

This would make IE treat the hover element in whichever tag you implemented.

  1. sfHover = function() {
  2. var sfEls = document.getElementById("nav").getElementsByTagName("LI");
  3. for (var i=0; i<sfEls.length; i++) {
  4. sfEls[i].onmouseover=function() {
  5. this.className+=" sfhover";
  6. }
  7. sfEls[i].onmouseout=function() {
  8. this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
  9. }
  10. }
  11. }
  12. if (window.attachEvent) window.attachEvent("onload", sfHover);

Report this snippet  

You need to login to post a comment.