Search code examples
jqueryasp.net-mvc-3unobtrusive-ajax

Unobtrusive Ajax stopped working after update jQuery to 1.9.0


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:

enter image description here

Code hasn't changed of course, just updated the jQuery scripts using Nuget.

Anyone experienced the same problem ??


Solution

  • .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.