【发布时间】:2014-01-14 15:34:15
【问题描述】:
我正在使用 JQuery UI,以便我可以使用盲功能向下滑动 div,但是,它无法正常工作。
这是我开始的 JSFiddle:http://jsfiddle.net/CBe3w/192/
由于某种原因,在滑动动画完成之前,侧面不会注册,此时它们会弹出。我怎样才能使边从头到尾注册(它们应该总是是box类的宽度)?
HTML:
<div class="box">
Click Me!
<div class="footer">
Why does it do this?
</div>
</div>
CSS:
.box {
background: #f5f5f5;
width: 250px;
padding: 25px;
}
.footer {
background: red;
padding: 15px 25px;
margin-top: 25px;
margin-left: -25px;
margin-right: -25px;
display: none;
}
JS:
$('.box').click(function() {
$('.footer').toggle("blind");
});
【问题讨论】:
-
Bagwell,您能解释一下为什么选择 html 重新设计解决方案吗?很好奇,因为我的解决方案只暗示了 3 行 css 操作。
标签: javascript jquery jquery-ui