开发者

How to animate jquery effects simultaneously

开发者 https://www.devze.com 2023-02-27 03:56 出处:网络
for example I have 2 jquery effects and 3 object: $(\'.test1\').fad开发者_Python百科eIn(); $(\'.test2\').fadeOut();

for example I have 2 jquery effects and 3 object:

$('.test1').fad开发者_Python百科eIn();
$('.test2').fadeOut();
$('.test3').fadeOut();

when .test1 fades in .test2 and .test3 must fade out simultaneously. how can I do it without extra plugin and without opacity animation?


you can use the callback for achieving the same

$('.test1').fadeIn('slow', function() {
      $('.test2').fadeOut();
      $('.test3').fadeOut();
});


$(".test1").fadeIn("fast",function(){$(".test2,.test3").fadeOut()});
0

精彩评论

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