我想知道是否有人可以帮助我: 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);
});
我希望在 box2(红色)和 box3(黄色)之间滑动过渡之前,用户可以看到高度动画,因为两者的高度不同。
有什么想法吗?
谢谢大家!
最佳答案
你需要这个吗?
$(".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);
});
});
关于javascript - .show ('slide' 期间的 jQuery 动画高度),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20578190/