jQuery   发布时间:2022-03-30  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了动画完成时jQuery高度动画跳转大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
参见英文答案 > jQuery animate()                                    4个
我有一组按钮,当单击时,页面上的指令淡出,所需内容淡入.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()

并在示例页面上的#tixcontainer中添加overflow:hidden会停止跳转.

大佬总结

以上是大佬教程为你收集整理的动画完成时jQuery高度动画跳转全部内容,希望文章能够帮你解决动画完成时jQuery高度动画跳转所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。