MVC3-将jQuery从1.5.2更新到最新版本 [英] MVC3 - Update jQuery from 1.5.2 to latest

查看:41
本文介绍了MVC3-将jQuery从1.5.2更新到最新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用jQuery 1.5.2的MVC3项目,我想更新到最新版本.我对MVC3有点陌生,我想知道更新jQuery的后果吗?有人对此有经验吗?以及如何实现呢?

I have a MVC3 project that uses jQuery 1.5.2 and I would like to update to the latest version. I am a bit new to MVC3 and I am wondering about the consequences of updating jQuery? Does anybody have any experience whit this? And how can it be achieved?

最诚挚的问候部门

推荐答案

一般

与以前的版本相比,jQuery 1.9.x发生了很大的变化.您可以从此处检查这些更改.jQuery团队做了出色的工作,并创建了 jQuery Migrate插件.想法是将1.5.2版本更改为最新版本,然后还添加指向jQuery Migrate插件的链接(在jQuery之后).

In general

There are big changes in the jQuery 1.9.x compared to the previous versions. You can check those changes from here. jQuery team did great work and created jQuery Migrate plugin. The idea is that you change your 1.5.2 version to the latest and then also add link to the jQuery Migrate Plugin (after the jQuery).

Migration插件将执行的操作是检查您是否正在使用不赞成使用的功能(如.live),并且该插件可充当新实现的代理.您应该检查Developer Toolbar控制台中是否有消息,并根据提示进行更改.

What the Migration plugin will do is that it checks if you're using deprecated features (like .live) and the plugin works as proxy to the new implementation. You should the check the Developer Toolbar console for messages and make the changes according to the tips.

jQuery迁移插件是一个临时解决方案,因为它增加了开销,如果您使用的是过时的功能,则确实应该进行这些更改.

The jQuery Migration plugin is a temporary solution as it adds overhead and you really should make those changes if you're using deprecated features.

根据正在使用的第三方库(Telerik,DevExpress等),如果它们使用的功能/API调用不再受支持,则可能会出现一些错误.也许他们有使用当前jQuery版本实现的较新版本.

Depending on what 3rd party libraries you're using (Telerik, DevExpress etc.) you might get some errors if they are use features/API calls that are not supported anymore. Maybe they have newer version that is implemented using current jQuery version.

这篇关于MVC3-将jQuery从1.5.2更新到最新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆