将 jQuery 更新到 1.9.0 后,不显眼的 Ajax 停止工作 [英] Unobtrusive Ajax stopped working after update jQuery to 1.9.0
问题描述
我刚刚更新了 jQuery &jQuery UI:jquery-1.9.0.min.js 和jquery-ui-1.9.2.min.js
而且...我所有不显眼的 Ajax 调用(Ajax.ActionLink、Ajax.BeginForm)都停止正常工作 - 它们在新页面中打开结果,而不是更新现有的 div.
当我的页面加载时,我在 Firebug 中收到此 javascript 错误:
代码当然没有改变,只是使用 Nuget 更新了 jQuery 脚本.
有人遇到过同样的问题吗??
.live()
自 1.7 起已被弃用,并正式成为 在 jQuery 1.9 中移除.使用 .on()
代替,因为它是执行同样事情的首选方法.>
I have just updated jQuery & jQuery UI to: jquery-1.9.0.min.js and jquery-ui-1.9.2.min.js
And... all my unobtrusive Ajax calls (Ajax.ActionLink, Ajax.BeginForm) stopped working properly - they open results in a new page instead of updating the existing div.
And I get this javascript error in Firebug when my page loads:
Code hasn't changed of course, just updated the jQuery scripts using Nuget.
Anyone experienced the same problem ??
.live()
has been deprecated since 1.7 and was officially removed in jQuery 1.9. Use .on()
instead as it is the preferred method of doing the same thing.
这篇关于将 jQuery 更新到 1.9.0 后,不显眼的 Ajax 停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!