5
如何使用jQuery延迟动画?jQuery动画延迟
我需要一个导航来扩大宽度,然后展开高度,然后反转为反向动画。
代码:
$(function() {
$("#nav li").not("#logo, #nav li ul li").hover(function(){
$(this).animate({width:"200px"},{queue:false,duration:1000});
}, function(){
$(this).animate({width:"30px"},{queue:false,duration:1000});
});
$("#nav li.parent").hover(function(){
$(this).children("ul").animate({height:"40px"},{queue:false,duration:500});
}, function(){
$(this).children("ul").animate({height:"0px"},{queue:false,duration:500});
});
});
我假设你的jsfiddle将清除此,但其中究竟那一点代码去了?我对jQuery非常陌生,所以对noob问题感到抱歉 – JacobTheDev
动画之间,我添加了jsFiddle,随时去看看。 –
啊,我明白了,但是如果我想让它处于两种不同的悬停状态,就像我的代码示例一样? – JacobTheDev