【发布时间】:2012-12-17 20:34:25
【问题描述】:
我想在悬停时隐藏一个 dom 元素。我想显示它下面的 div。 问题是当第一个元素隐藏时,jquery 不再看到悬停并将悬停 div 带回来。所以 div 的切换速度非常快。
当您的鼠标超出 div 区域时,我想要“前面”。
<div class="blockLong front" ></div>
<div class="blockLong"></div>
div 以绝对位置放置在eatchother 上并且大小相同
这是jquery:
$('.front').hover( function()
{
$(this).hide();
});
$('.front').mouseout( function()
{
$(this).show();
});
【问题讨论】:
-
将不透明度设置为 0。
-
我想完全隐藏它,而不是不透明度为 0
-
为什么是-1,我的问题有什么问题?
标签: jquery css hover mouseevent