Issue with DIV Show/Hide code?

后端 未结 1 1205
栀梦
栀梦 2021-01-21 18:05

The below code allows a div to appear when the user rolls over a link. The issue is, is that the div doesn\'t disappear when the user rolls off the link. Is there anyway we can

1条回答
  •  不思量自难忘°
    2021-01-21 18:36

    Add a mouseout function. Add the following code under your x[i].mouseover function call:

    x[i].onmouseout=function(){ 
      var m = document.getElementsByClassName('HoverMe', 'a'); 
      var n = document.getElementsByClassName('showMe', 'div'); 
      for(var i = 0; i

    Check out the fiddle here: http://jsfiddle.net/babcN/

    0 讨论(0)
提交回复
热议问题