我正在某个窗格上制作一个较大的旋转木马的div。要扩大我做的窗格:
if(currentPane==2)
{
$("#carousel").animate({height:320},1000);
$("#carousel").animate({top:411},1000);
$("#dropShadow").animate({top:731},1000);
}
这非常有效。当我离开这个窗格时,我想再次将轮播返回到较小的尺寸,我这样做:
if(currentPane==3)
{
$("#dropShadow").animate({top:672},1000);
$("#carousel").animate({top:411},1000);
$("#carousel").animate({height:100},1000);
}
Drophadow返回到它的原始位置,但旋转木马拒绝减小尺寸。
对我而言,似乎我使用相同的代码,所以不明白为什么它不起作用。
答案 0 :(得分:0)
if(currentPane==3)
{
$("#dropShadow").stop(true).animate({top:672},1000);
$("#carousel").stop(true).animate({top:411},1000);
$("#carousel").stop(true).animate({height:100},1000);
}