javascript - IE8 上的 jQuery,错误 : Object doesn't support this property or method

标签 javascript jquery css internet-explorer internet-explorer-8

我为正在构建的 WordPress 主题安装了 jQuery。我暂时放弃了测试 IE6 和 IE7(布局 hell ),现在我正在使用 IE8 对其进行测试。每次我单击 prettyPhoto 链接或 jQuery 循环链接时,JS 都会发出此错误并且无法调出灯箱或移动 slider 。像往常一样,他在所有其他浏览器中工作正常。

网站在http://themes.thefirm.gambit.ph

您可以在 IE8 中以及单击标题区域的向左或向右箭头时看到该错误。

Object doesn't support this property or method

有人可以帮忙吗?还有其他人遇到过这个吗?我对此感到很困惑,我无法从 Google 中找到任何内容。

Update: I've uploaded the site and updated this question

最佳答案

导致错误的 jQuery(缩小版)行是:

somehwere in line 140: var C=Bb.exec(u)

解决方案是将此行更改为:

var C=Bb.exec(u.toString())

@kirilloid 是正确的,因为 Regexp 会抛出错误,尤其是当匹配的值是数字时。 例如动画 css 属性,如不透明度、顶部、左侧等。 将其转换为字符串可以解决问题。现在 IE 不再收到任何错误。

自从我编辑了 jQuery 库文件后,我不太喜欢这个修复程序,但我想我将不得不使用它。更改不一定会对正常功能产生任何不良影响。

关于javascript - IE8 上的 jQuery,错误 : Object doesn't support this property or method,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4987842/

相关文章:

javascript - 使用 Canvas 外解决方案时,如何使固定标题与 body 的其余部分保持一致?

javascript - iggrid 添加新行事件

javascript - 覆盖画笔选择的默认移动行为

javascript - 如何使 AJAX 正常运行 (event, ui)?

php - 如何在 jQuery 和 PHP 中验证表单

javascript - 将回调函数作为参数返回 false

javascript - 使用 javascript 创建 2 个 html 表

javascript - 在 Visual Studio 2010 中运行 javascript 函数时出现无效 ID 错误

html - 将三个 DIV 并排放置在父级内部

html - 无法从 DDmenu 链接到 iframe