更新的jQuery 1.8.3将jQuery 1.9.0在ASP.NET MVC 4 [英] Update jQuery 1.8.3 to jQuery 1.9.0 in ASP.NET MVC 4
问题描述
我们使用ASP.NET MVC 4和我更新我们的项目从jQuery的1.8.3使用jQuery 1.9.0,
但现在不工作的客户端脚本,如jQuery验证,不显眼的jQuery Ajax和第三方jQuery库等!
we use ASP.NET MVC 4 and i update our project to use jQuery 1.9.0 from jQuery 1.8.3, BUT now Not work client scripts,like jQuery validation,jquery unobtrusive ajax and 3rd party jQuery library and etc!
据的http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released我们必须使用的jQuery插件迁移。我们的在我们的MVC项目捆绑使用,但是当我使用这个插件在控制台不可用!jQuery.migrateWarnings
According to http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released we must use jQuery Migrate Plugin.we use Bundling in our MVC project,but when i use this plugin, jQuery.migrateWarnings not available in console!
我的问题:
我们要如何与捆绑启用更新的jQuery 1.8.3将jQuery 1.9.0无ASP.NET MVC 4什么问题?
how we must update jQuery 1.8.3 to jQuery 1.9.0 without any problem in ASP.NET MVC 4 with Bundling enabled?
推荐答案
运行应用程序并从您的浏览器中查看应用程序的源 - ?是的jQuery 1.9.0或1.8.3的版本
Run your application and from your browser view the application's source - is the version of jQuery 1.9.0 or 1.8.3?
在Visual Studio中,如果你去工具 - >库包管理器 - >管理的NuGet软件包的解决方案...然后在左侧点击更新,你应该看到的jQuery上市 - 点击更新
In Visual Studio, if you go to Tools -> Library Package Manager -> Manage Nuget Packages for Solution... then on the left click updates and you should see jQuery listed - click update.
据我所知,这看起来一切之后。再次检查源。
As far as I know, this will look after everything. Check the source again.
您可以做的另一件事:去解决方案管理器 - > App_Start - > BundleConfig.cs - 确保第一个 bundles.Add
调用是这样的:
One other thing you can do: go to Solution Explorer -> App_Start -> BundleConfig.cs - make sure the first bundles.Add
call is like this:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-migrate-1.0.0.js"));
编辑:
看新的软件包code - 显然是确保您已经下载的文件迁移
Look at new bundle code - obviously be sure you have downloaded the migrate file.
这篇关于更新的jQuery 1.8.3将jQuery 1.9.0在ASP.NET MVC 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!