gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 23:57:42 25 4
gpt4 key购买 nike

我有一组按钮,单击这些按钮时,页面上的说明会淡出,所需内容会淡入。div 还可以使用 jQuery .animate() 函数进行扩展。当 div 完成扩展时,高度会跳得更短。我做了一个 jsFiddle 但它在那里工作得很好。所以,它一定和我的其余内容有关。

Here's the site

http://northviewhigh.com/index/fbla/1213/eb/styles.css - 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>
#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');
});

最佳答案

这看起来是同一个问题:

jQuery animate()

并将 overflow:hidden 添加到示例页面上的 #tixcontainer 会停止跳转。

关于jQuery高度动画在动画完成时跳跃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12906150/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com