【发布时间】:2011-08-27 22:11:20
【问题描述】:
jQuery 新手,但正在尝试解决这个问题。
我拥有的是内容框列表。当我们将鼠标悬停在每个盒子上时,一个带有详细信息的 div 会从右侧滑入(设计师也想要一个“反弹”效果),并在鼠标移出时隐藏。
我确实可以访问项目中的 jQueryUI。
这是我目前所拥有的:
每个盒子的 HTML
<div class="tool_master show">
<div class="tool_hover"> Hover information here </div>
<div class="tool_box" > Content here </div>
</div>
CSS
.tool_box {
height:100px;
width:460px;
position:relative;
}
.tool_hover {
height:100px;
width:460px;
background:#525051;
position:absolute;
z-index:100;
display:none;
}
我创建了一个 jquery 脚本来显示/隐藏哪个有效
$(".show").hover(function(){
$(this).closest("div").find(".tool_hover").toggle();
}, function(){
$(this).closest("div").find(".tool_hover").toggle();
});
这完成了工作,但没有提供设计师想要的“经验”。
它需要做的是从右侧快速滑入,并可能产生反弹效果。退出时,向右滑出。我不是很精通jquery动画。
有人可以帮帮我吗?
提前致谢!
【问题讨论】:
标签: jquery jquery-ui jquery-animate