开发者

Don't queue fadeTo(), fadeIn()/fadeOut()

I have the following animations:

$('#id').animate({'margin-top': 100, 'margin-left':开发者_如何学运维 100}, {queue: false, duration: 1000});
$('#id2').fadeTo(1000, 1);

this seems to be queuing, how can i make sure that fadeTo() doesn't queue?


Try:

$('#id2').stop().fadeTo(1000, 1);


Move the opacity change into the animation.

$('#id').css({opacity:0}).show().animate({marginTop: 100, marginLeft: 100, opacity:1}, 1000);

http://jsfiddle.net/vcBPR/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜