我遇到一个问题,即fadeout在开始淡出之前等待动画结束,即使它应该首先淡出。
有什么方法可以让它同时发生?
$('.hover-div').mouseout(function() {
$('div.hidden').fadeOut(); // this happens AFTER the following animations are done
$('.carousel-bg').animate({
'top': 112,
'height': 130
}, 200);
$('div.carousel-holder div.text').animate({
'top': 125
});
});
答案 0 :(得分:0)
在milliseconds
中管理您的显示速度试试这个: -
$('div.hidden').fadeOut(50);
$('.carousel-bg').animate({
'top': 112,
'height': 130
}, 200);
$('div.carousel-holder div.text').animate({
'top': 125
}, 200);
答案 1 :(得分:0)
$('.hover-div').mouseout(function() {
$('.carousel-bg').animate({
'top': '112px',
'height': '130px'
}, 200);
$('div.carousel-holder div.text').animate({
'top': '125px'
}, function() { $('div.hidden').fadeOut(); });
});