Jquery 使用淡入显示/隐藏剪辑效果
需要帮助了解如何将淡出/淡入添加到以下内容:Jquery 使用淡入显示/隐藏剪辑效果,jquery,jquery-ui,animation,jquery-animate,Jquery,Jquery Ui,Animation,Jquery Animate,需要帮助了解如何将淡出/淡入添加到以下内容: $(function(){ $('#menu').stop(true, true).hover(function(){ $('.content').stop(true, true).delay(300).show( "clip", {direction: "vertical"}, 200
$(function(){
$('#menu').stop(true, true).hover(function(){
$('.content').stop(true, true).delay(300).show(
"clip",
{direction: "vertical"},
200
);
},
function(){
$('.content').stop(true, true).hide(
"clip",
{direction: "vertical"},
200
);
});
});
当动画剪辑
在显示/隐藏时出现时,我希望它与剪辑
同时淡入/淡出,但当前如果我添加.animate
或.fadeIn/out
,它只是排队
(使用jQuery和jQuery UI)
有什么想法吗?您可以使用.animate()
而不是.fadeIn()
/.fadeOut()
,它可以被传递一个选项(队列:false
),该选项可以使动画立即运行,而不是将其放入队列中
基于您的代码的示例(默认情况下只需将不透明度设置为零):
你能给我们看一个演示/示例吗。也许用Hi Alex来编码,看:耶!谢谢,我试过了,但是队列错误最初对我不起作用(一定是做错了什么)。
$('.content')
.stop(true, true)
.show( "clip",{direction: "vertical"}, 800 )
.animate({ opacity : 1 }, { duration: 800, queue: false });