使用jQuery 1.7.2水平滑动动画? [英] Horizontal slide animation using jQuery 1.7.2.?
本文介绍了使用jQuery 1.7.2水平滑动动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以提出一个方法来实现使用jQuery 1.7.2库出库jQueryUI的水平幻灯片动画。到目前为止,这个设置我已经成功使用来实现纵向滑动
Can anyone suggest a way to implement a horizontal slide animation using the jQuery 1.7.2 library with out the jQueryUI library. So far with this set up I've managed to implement a vertical slide using
$('#selectorId').fadeIn(1000);
和使用淡入:
$('#selectorId').slideToggle('slow');
也请不我已经排除了使用CSS的过渡,因为据我可以告诉你不能做一个回调函数的方式。
Also please not I have ruled out using CSS for the transition because as far as I can tell you can't do a call back function that way.
推荐答案
您可以使用效果模块从jQueryUI的。
You could use the effects module from JQueryUI.
<a href="#" id="slidetoggle">
Slide toggle the box
<div id="box">This is the box that will be toggled</div>
</a>
JQuery的
JQuery
//hide box per default
$('#box').hide();
$('#slidetoggle').click(function() {
$('#box').toggle('slide', 400);
return false;
});
CSS(只是看到一些大纲)
CSS(just to see some outlining)
#box {
background: #EEE;
border: 1px solid #900;
height: 135px;
display: none;
}
的jsfiddle:
http://jsfiddle.net/HAQyK/1238/
这篇关于使用jQuery 1.7.2水平滑动动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文