我需要一些帮助。
我正在构建一个团队简介页面,当我调用 jQuery 插件时,IE8 不断崩溃。
我不确定发生了什么,甚至无法运行 IE 调试器,因为它崩溃得很厉害。
有任何 IE8/jQuery 专家愿意看看并提供一些帮助吗?
Here is the main team page.单击任何链接都会导致 IE8 崩溃。
我正在使用: jQuery Tagsphere、AnythingSlider 和 jQuery Cycle。
预先感谢您对此的任何见解。
最佳答案
我遇到了类似的问题,最明显的是使用 IE8 关闭 iframe。在 jquery-1.6.2 中偶然发现了以下代码,该代码旨在解决 document.domain 的问题。网络上的一些评论让我相信这是最近出现的问题。退回到jquery-1.4.4,问题解决了。
来自 JQUERY-1.6.2 的代码段如下:
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
ajaxLocation = location.href;
} catch( e ) {
// Use the href attribute of an A element
// since IE will modify it given document.location
ajaxLocation = document.createElement( "a" );
ajaxLocation.href = "";
ajaxLocation = ajaxLocation.href;
}
关于javascript - IE 8(仅)因 JavaScript/jQuery 调用插件而崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6470377/