Jquery 1.6.2 使 IE8 选项卡崩溃

发布于 2024-11-26 12:12:51 字数 678 浏览 0 评论 0 原文

各位开发人员大家好,

我对此有点困惑,因为直到三天前我一直在使用 JQuery 1.6.2,没有出现任何问题。 (在这个时候的某个时候有一个服务包更新)

无论如何,问题如下:

我正在使用 HTML5 进行编码,并且已经有一段时间了,没有任何问题,但是三天前我开始更新一些旧版本网站。这个特定的网站(以及其他一些网站)需要更新 JQuery 版本,因此我决定调用 Google 托管的 1.6.2 版本。

一旦我这样做,我的网站就开始使我的 IE8 选项卡崩溃。在我正在开发的网站上,我的循环插件不再工作,并且由于某种奇怪的原因,当我将鼠标悬停在链接上时,我的 UL 列表现在变成白色!

我开始抓狂,认为也许 IE8 与 HTML5 存在兼容性问题,所以我回去更改了所有编码,删除了 HTML5 元素,然后甚至回到了 xhtml doctype。事情还在继续。

然后我查看了插件代码,试图找到遇到同样问题的其他人。没有什么问题。

最终我拿出了 Jquery,网站恢复正常并且没有使选项卡崩溃!

我已经用 1.4.3 左右的旧版本替换了 1.6.2 版本,这似乎工作正常!?

还有其他人遇到 1.6.2 和 IE8 的问题吗?就像在所有其他浏览器中一样,我可以让我的网站在我调用的任何版本的 JQuery 上都能完美运行。

提前致谢。

亲切的问候

理查德

Hello fellow developers,

I am a little stumped on this one as I have been using JQuery 1.6.2 with no issues until three days ago. (There was a service pack update at some point around this time)

Anyway the issue is as follows:

I am coding in HTML5 and have been for some time now, no problems there, but three days ago I began to update some of the older websites. This particular website (and some others) required an update to the JQuery version so I decided to call on the hosted 1.6.2 version from Google.

As soon as I did this my website's began to crash my IE8 tabs. On the website I am working on, my cycle plugin no longer works and for some strange reason my UL list now goes white when I hover over the links!

I started pulling out my hair and thought maybe IE8 was have compatibility issues with HTML5, so I went back and changed all the coding, getting rid of HTML5 elements and then even going back to xhtml doctype. It still continued.

I then went through the plugin code, trying to find others who had experienced the same problems. Nothing wrong there.

Eventually I took out the Jquery and the site went back to normal and didn't crash the tabs!

I have since replaced the 1.6.2 version with an older version I have laying around 1.4.3 and that seems to work fine!?

Is anyone else having issues with 1.6.2 and IE8 - Like always in every other browser I can get my hands on the site performs perfectly with whatever version of JQuery I call upon.

Thanks in advance.

Kind Regards

Richard

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

红尘作伴 2024-12-03 12:12:51

jQuery 开发人员已经解决了这个问题。关联的错误项目是 #9823 并且提交是 5c4a9cc001fcd803efa65ff95571c72cbdafbe69。对我有用。

The jQuery developers have fixed the issue. The associated bug item is #9823 and the commit is 5c4a9cc001fcd803efa65ff95571c72cbdafbe69. Works for me.

只是偏爱你 2024-12-03 12:12:51

解决方案

这是 jQuery 1.6.2 版(开发时的最新版本)的问题。幸运的是他们解决了这个问题,所以你的修复很简单......更新到最新版本的 jQuery。

The Solution

It is an issue with jQuery version 1.6.2 (which was the latest version at time of development). Luckily they fixed the issue, so the fix on your end is simple… Update to the latest version of jQuery.

我还不会笑 2024-12-03 12:12:51

有一个非常类似的问题

  • 我对jQuery 1.6.2
  • 类似 facebook 的按钮
  • 和 body 元素上的背景图像

,如 jjmontes 所说如上所述,删除/更改上述任何内容都可以解决该问题。将 IE 模式更改为兼容模式并不能解决问题,避免此问题的最简单方法可能是使用较新版本的 jQuery。
演示/测试用例(因为上面不再在线) 可以在这里看到

I had a very similar issue with

  • jQuery 1.6.2
  • a facebook like button
  • and a background image on the body element

As jjmontes stated above, removing / changing any of the above will solve the issue. Changing the IE mode to a compatibility mode did not resolve the issue, probably easiest way of avoiding this problem is to use a newer version of jQuery.
Demo / test case (since the above is not online anymore) can be seen here.

梦里的微风 2024-12-03 12:12:51

我想我这里有一个很好的测试用例来说明这种行为:

http://onpoint.wbur.org/op_full .html

此页面运行最新的 Jquery、Disqus 脚本,仅此而已。

如果您访问该页面,它不会崩溃。但刷新页面会导致IE8崩溃。

修复:

以下任何一项都可以修复崩溃:

  • 删除 Jquery
  • 删除 Disqus
  • 完全删除 BODY 样式声明
  • 仅删除背景图像调用并改为使用 BG 颜色
  • 将样式块移动到 Jquery 调用下方

因此,标记之间存在一些交互disqus 脚本正在引入 DOM、Jquery 和顶部的 BODY css 规则。

很奇怪,但这里肯定有一个错误,无论是在 Disqus 的标记中还是在 Jquery 中。

I think I have a good test case example here of this behavior:

http://onpoint.wbur.org/op_full.html

This page is running the latest Jquery, a Disqus script and not much else.

If you visit the page, it won't crash. But refreshing the page will cause IE8 to crash.

Fixes:

Any of the following will fix the crash:

  • Remove Jquery
  • Remove Disqus
  • Remove the BODY style declaration altogether
  • Remove just the background image call and instead use BG color
  • Move the style block to below the Jquery call

So there's some interaction between the markup that the disqus script is pulling into the DOM, Jquery and the BODY css rule at the top.

Very strange but there's definitely a bug here, either in Disqus' markup or Jquery.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文