jQuery:用滑动代替淡入淡出
我有下面的脚本来隐藏一个 div 的内容并显示另一个
$("#"+objCurrentDiv).fadeOut("slow",function(){
$("#"+objNewDiv).fadeIn("slow");
});
div 这给了我淡入淡出效果。现在我想通过滑动(从左到右)替换淡入淡出效果。 我尝试了幻灯片显示方法,但无法成功。 任何人都可以帮我重写它吗?
I have the below script to hide the content of one div and show another
$("#"+objCurrentDiv).fadeOut("slow",function(){
$("#"+objNewDiv).fadeIn("slow");
});
This is giving me the fading effect.Now i want to repalce the fade effect with sliding (left to right.
I tried the slide in show method, but could not succeed. Can any one help me to rewrite it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于标准函数 .slideDown 和 .slideUp 将实现垂直效果,因此您必须像这样使用 .animate:
Since the standard function .slideDown and .slideUp will do the effect vertically, you have to use .animate like this: