Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery高度动画在动画完成时跳转_Jquery_Jquery Animate - Fatal编程技术网

jQuery高度动画在动画完成时跳转

jQuery高度动画在动画完成时跳转,jquery,jquery-animate,Jquery,Jquery Animate,我有一组按钮,当点击时,页面上的说明会淡出,所需的内容也会淡入。div还使用jQuery.animate()函数展开。当div完成扩展时,高度会变短。我做了一个JSFIDLE,但在那里效果很好。所以,它一定与我的其他内容有关 -CSS文件 [同上,不能发布更多链接]/eb/jquery/scripts.js jquery文件 下面是代码: <div id="tixcontainer"> <div class="tixinfo startinfo">

我有一组按钮,当点击时,页面上的说明会淡出,所需的内容也会淡入。div还使用jQuery.animate()函数展开。当div完成扩展时,高度会变短。我做了一个JSFIDLE,但在那里效果很好。所以,它一定与我的其他内容有关

-CSS文件

[同上,不能发布更多链接]/eb/jquery/scripts.js jquery文件

下面是代码:

<div id="tixcontainer">

    <div class="tixinfo startinfo">
        Select a ticket type to begin ordering your graduation tickets. 
    </div>

    <div class="tixinfo hidden gradinfo">
        You selected "Graduate"
    </div>
</div>

这看起来是同一个问题:

溢出:hidden
添加到示例页面上的
#tixcontainer
,可以停止跳转

#tixcontainer {
    width:100%;
    height:100px;
}

.tixinfo {
    position:absolute;
    top:629px;
}

.startinfo {
    height:100px;
}

.gradinfo {
    height:200px;
}
function expandTix(newHeight,cat) {
    $('.startinfo').fadeOut();
    $('#tixcontainer').animate({
        height: newHeight
    }, 'slow', function() {
        $('.'+cat+'info').fadeIn();
    });
}

$('.gradbutton').click(function() {
    dimAllBut('grad');
    expandTix(200,'grad');
});