jquery – 空的悬浮事件在IE中未触发

我有一个div里面有一个小孩div。当鼠标悬停在父div上时,我使用jQuery显示/隐藏子div(父div跨越页面的整个底部。宽度:100%和高度100px)。我已经使用firebug和ie开发者工具栏来确认父div在页面上。

我可以将鼠标悬停在Chrome和FireFox的空父父div中,一切正常。 IE要求我有一些内部的文字来悬停。只有一个空白的div悬停事件不会触发。

这个问题的所有可行的工作呢?

–update

试过你的所有建议,但没有任何工作。

<div id="toolBar">          
  <div>
    <button id="btnPin" title="Click to pin toolbar" type="button">
      <img id="pin" src="../../images/icons/unpin.png" alt="Pin" /></button>
      <img src="../../images/icons/search.png" border="0" alt="Search" />
  </div>
</div>

以上html包含在master页面的div容器中。孩子div被jQuery隐藏,有些悬停在/ out事件中。父div(toolBar)始终在页面上可见。当工具栏上出现鼠标悬停时,显示小孩div。

感谢jQuery代码

$('#toolBar').hover(ToolBar_OnHover,ToolBar_OnBlur);

function ToolBar_OnHover() {

  $(this).children().fadeIn('fast');
  $(this).animate({ height: "100px" },"fast");

}

function ToolBar_OnBlur() {

  $(this).children().fadeOut('fast');
  $(this).animate({ height: "50px" },"fast");

}

最后这里有一点css

#toolBar { width: 100%; height: 100px; text-align:center; vertical-align:middle; position: absolute;  bottom: 0; background-color: Transparent;  }
#toolBar div { padding: 5px 5px 0px 5px; width:75%; height: 95px; background: transparent url('/images/toolbar-background.png') repeat-x; margin-right: auto; margin-left: auto; }

解决方法

如果您设置背景颜色或边框,它将工作

如果你能匹配这些与现有的外观,那么你会没事

(背景图像似乎是最不引人注目的解决方案)

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...