Posted By

mariusscheel on 04/06/10


Tagged

ie dropdown hover suckerfish pseudo internet-explorer


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

jonkemp


Adding :hover pseudo class to IE


 / Published in: JavaScript
 

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

  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.