- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
好吧,经过一段时间的挠头并“嗯?”试图找出为什么 IE 在加载我的一个加载了 jQuery 的页面时会直接崩溃,我将罪魁祸首的范围缩小到了这一行
$('div#questions').hide();
当我说 IE 崩溃时,我的意思是它完全崩溃了,试图进行网页恢复,但失败了。
我正在运行 jQuery 1.4.2 并使用 IE 8(尚未使用任何其他版本进行测试)
我当前的解决方法是这样的:
if ($.browser.msie) {
window.location = "http://www.mozilla.com/en-US/products/download.html";
}
出于某种原因,我觉得我的 IE 用户不会对此解决方案感到非常满意。
有问题的 div 中有很多内容,其他 div 被隐藏并再次显示,所有这些都工作得很好,只有当巨大的父 div 被隐藏时 IE 才会翻转并刺伤本身。
有没有人遇到过这种情况或者对出了什么问题有任何可能的想法?
编辑:
所有内容都包含在 $(document).ready(function() { }); 中而且我的代码都是内部的,所以不幸的是我无法链接它。
编辑:发现 IE 8 崩溃代码
<ol class="actionHelp">
<li>List the tasks (or actions) that are involved in your pattern along the top (one per column)</li>
<li>Put the starting point in the first column and the ending point in the last column.</li>
<li>To fill in the middle, simply ask: "What happens next?" If only one thing ever happens next, then it should get 100%. If 70% of the time one thing happens next, and 30% of the time another thing happens next, then put 70 in one box and 30 in the other.</li>
<li>Each row should add up to 100%</li>
<li>The last row is the exit and should not have any percentages in it.</li>
</ol>
我不知道为什么这会在 IE 中引起问题,但这是 CSS
.actionHelp {
margin: 0 0 0 20px;
}
.actionHelp li {
margin: 5px 0;
}
使用无序列表而不是有序列表不会导致崩溃,但是一旦我将其切换回来,我就会再次崩溃,这个元素不需要排序,我只是将其作为逻辑步骤从某种意义上说,我仍然想知道为什么这会让 IE 感到害怕。
jQuery + IE + 隐藏 ol 元素 = OMG IE FAIL 吗?或者有解决办法吗?
它似乎会影响任何具有除无之外的列表样式的列表元素
最佳答案
您的问题显然不是 div#questions
本身。您能否尝试删除(或注释掉)div#questions
的所有内容,然后一次添加一个元素,直到 IE 再次开始崩溃?
找到罪魁祸首后,请对该元素再次执行相同的操作,删除其所有内容并将每个元素添加回来,并在每个元素之后进行测试。
继续这样做,直到找到问题的真正根源。我知道这是一种技术含量很低的解决方案,但通常也是最快的解决方案。
关于jQuery 和 IE 在 $ ('#someDiv' ).hide(); 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2567398/
好吧,经过一段时间的挠头并“嗯?”试图找出为什么 IE 在加载我的一个加载了 jQuery 的页面时会直接崩溃,我将罪魁祸首的范围缩小到了这一行 $('div#questions').hide();
$("#someDiv").attr("scrollHeight") 适用于所有浏览器的 jquery 1.3.2 。但更新到 jquery 1.6.1 后,它仅适用于 IE9。Firefox 4.0
我有 jquery 表达式 toolbar.css('top', pos > 0 ? pos : 0); ... pos 是一个计算得出的数值变量上面(但此处未显示,因为它不相关)。 我正在尝试找出
我已经做了相当多的谷歌搜索并查看了“你可能不需要jquery”,但仍然无法找出问题所在。 我有一个 makeTable 函数,它构建一个 html 元素字符串以形成一个表格。当我使用 Jquery .
我是一名优秀的程序员,十分优秀!