jQuery在.show期间设置高度动画('幻灯片')

jQuery animate height during .show('slide')

本文关键字:幻灯片 动画 高度 show 设置 jQuery      更新时间:2023-09-26

我想知道是否有人能帮我:http://jsfiddle.net/jalxob/wMck2/7/

$(".turn_next").click(function(){
   $(".box2").hide();
   $(".box3").animate({height:'300px'}, 300);
   $(".box3").show('slide', {direction: 'right'}, 500);
});
$(".turn_back").click(function(){
   $(".box3").hide();
   $(".box2").animate({height:'100px'}, 300);
   $(".box2").show('slide', {direction: 'left'}, 500);
});

我希望在方框2(红色方框)和方框3(黄色方框)之间的幻灯片转换之前,用户可以看到高度动画,因为两者的高度不同。

知道吗?

谢谢你们!

你需要这个吗?

$(".turn_next").click(function(){
   $(".box2").hide();
   $(".box1_content").animate({height:'300px'}, 300,function(){
         $(".box3").show('slide', {direction: 'right'}, 500);
   });
});
$(".turn_back").click(function(){
   $(".box3").hide();
   $(".box1_content").animate({height:'100px'}, 300,function(){
       $(".box2").show('slide', {direction: 'left'}, 500);
   });
});

演示