jQuery 对向后兼容性的支持程度如何?

发布于 2024-07-08 01:44:15 字数 131 浏览 10 评论 0原文

我们遇到了 Mootools 不太向后兼容的问题,特别是在拖放功能方面。 我想知道是否有人遇到过 jQuery 不向后兼容的类似问题。 我们开始大量使用它,并考虑升级到更新版本以开始使用多个需要它的插件。 如果我们摆脱旧版本会遇到任何问题吗?

We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to start using several plugins that require it. Will we have any issues if we get rid of the older version?

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

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

发布评论

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

评论(5

韵柒 2024-07-15 01:44:15

jQuery 似乎向后兼容得很好。 我已经通过几个版本的核心使用它几年多了,除了一些带有一些插件的小问题之外,升级时没有遇到任何问题。 我想说核心似乎很好,但如果你使用很多插件,你可能会遇到一些问题(但这些通常很容易修复,或者新核心无论如何都内置了该功能,所以你可以直接删除他们)。

jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins. I would say that the core seems to be fine but if you're using a lot of plugins you might run into some problems (but these are usually easy to fix, or the new core has that functionality built in anyway so you can just drop them).

秋凉 2024-07-15 01:44:15

jQuery 对于向后兼容性非常重视,以至于他们为每个版本都生成了一个“向后兼容性”插件: http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin。 它可以让不需要向后兼容性的人节省页面重量。

jQuery is so serious about backwards compatibility that they produce a "backwards compatibility" plugin for each release: http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin. It let people who don't need backwards compatibility save on page weight.

简单爱 2024-07-15 01:44:15

我的经验是,在升级时,我有时会发现以前有用的东西会损坏。 例如,当从 1.7.2 升级到 1.8.3 时,我发现一些拖放功能停止工作。 某些问题可能是由于已弃用的 jQuery 函数被删除,但仍被不兼容版本的 jQuery UI 使用。

以下是来自另一位用户的引用

向后兼容性可能不是 jQuery 团队的强项,但是
与大多数事情一样,这是一项正在进行的工作。 我不是故意的
贬低他们所做的伟大工作,但它指出了一个事实:
只是必须始终使用新版本的 jQuery 测试您的脚本。

My experience is that when upgrading, I sometimes find that stuff that used to work breaks. For instance, when upgrading from 1.7.2 to 1.8.3 I found some drag-and-drop features stopped working. Some problems may be due to deprecated jQuery functions being dropped, still in use by incompatible versions of jQuery UI.

Here is a quote from another user:

Backward compatibility may not be the jQuery team’s strong suit, but
as with most things, it’s a work in progress. I’m not meaning to
disparage the great work they do, but it points out the fact that you
simply must always test your scripts with new versions of jQuery.

伴随着你 2024-07-15 01:44:15
笔芯 2024-07-15 01:44:15

根据我的经验,jQuery 1.x 在 1.9 版之前一直非常向后兼容。

自 jQuery 1.9.0 起,jQuery 1.x 系列发生了重大变化。 如果您要从 1.9 之前的 jQuery 版本升级或需要使用尚未更新的插件,我们强烈建议您也使用 jQuery Migrate 插件。 阅读 jQuery 1.9 升级指南jQuery 1.9 发布博客文章了解更多信息.

在您确定这对您来说不是问题之前,不要升级到 2.0:

jQuery 2.x 具有与 jQuery 1.x 相同的 API,但不支持 Internet Explorer 6、7 或 8。

In my experience, jQuery 1.x has been very backwards-compatible until version 1.9.

The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated. Read the jQuery 1.9 Upgrade Guide and the jQuery 1.9 release blog post for more information.

And don't upgrade to 2.0 until you're sure that this isn't an issue for you:

jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8.

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