gpt4 book ai didi

Chrome 与 IE 的 jQuery 问题

转载 作者:太空宇宙 更新时间:2023-11-04 15:38:53 25 4
gpt4 key购买 nike

function runComplete() {
var $elem=$(document.getElementById('quiz_section'));
var center="<br /><h1>Your Score:</h1><h2>"+document.getElementById('quiz_score').innerHTML+"</h2><br /><br /><br /><a href='javascript:location.reload(true)'><h5>Try Again?</h5></a>";
$elem.html('<form id="comp" style="width:33.333333%;height:1px;background-color:lightblue;border=1px solid #000000;pading:10px">'+center+'</form>');
var theight=$elem.height()+20;
$elem.css('height','1px');
$elem.animate({height:theight});
}

在 IE 中,上面的代码运行得很好!在 Chrome 中……呃……没那么多。

它应该为表单设置动画并使其“掉落”,而不是调整它的大小。我在我的代码的其他地方使用了一种非常相似的技术(相同的动画),它在 Chrome 中运行得很好,这是唯一没有动画的东西。有什么想法吗?

这是测验的演示:

http://dalexl.tripod.com/HTMLQUIZ.htm

最佳答案

您应该改为调用 $elem.hide().slideDown()

关于Chrome 与 IE 的 jQuery 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5860766/

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