Empty div hover event not firing in IE

后端 未结 13 983
灰色年华
灰色年华 2020-12-08 08:52

I have a div with a child div inside it. I\'m using jQuery to show / hide the child div whenever a mouse hovers over the parent div (parent div spans the entire bottom of th

13条回答
  •  囚心锁ツ
    2020-12-08 09:10

    I was able to make use of the "Braille Pattern Blank" which is an invisible, non-whitespace character that is still "there", takes up a space, and allows events like mouseover to still fire. The snippet below shows this (the div isn't zero width as it would be if it were empty or contained only whitespace):

    .notActuallyEmpty {
      background-color: gray;
      width:50px;
    }
    ⠀⠀
    

提交回复
热议问题