Reputation: 21308
I've done all the steps as described in this post:
Unobtrusive Ajax stopped working after update jQuery to 1.9.0
and this one:
jquery.unobtrusive-ajax plugin broken when updating to Jquery 1.9.0
However I still get a warning in firebug at this line in (jquery.validate.unobtrusive.js)
$jQval.unobtrusive.parse(document);
Upvotes: 1
Views: 3642
Reputation: 8156
Your solution is not incorrect, and your fix does the job, but I think a little background information on it would not hurt.
Note that what causes the warning is the jQuery Migrate plugin.
It is for providing backward compatibility for code depending on older jQuery versions. If you do not want to be warned about deprecated features and how to update them to the current standard, you can disable the warnings with the following line of code:
jQuery.migrateMute = true;
Note that these warnings only happen with the development version of jQuery Migrate, so if you switch to the minified version of jquery migrate (jquery-migrate-1.0.0.min.js
) this line is not even required.
Also note that you are using the development versions of the jquery files, in a production environment you should use the minified versions, so your fix would need to be also implemented in jquery.validate.unobtrusive.min.js
.
So all in all:
Upvotes: 1
Reputation: 21308
got it working without any issues now. Please let me know if this is incorrect but from what I'm seeing it's working fine.
jquery.validate.unobtrusive.js
Line 209 from this:
var $forms = $(selector)
.parents("form")
.andSelf()
.add($(selector).find("form"))
.filter("form");
Line 209 to this:
var $forms = $(selector)
.parents("form")
.addBack()
.add($(selector).find("form"))
.filter("form");
Line 43:
replace = container.attr("data-valmsg-replace") && $.parseJSON(container.attr("data-valmsg-replace")) !== false;
Line 73:
replace = container.attr("data-valmsg-replace") && $.parseJSON(container.attr("data-valmsg-replace"));
Upvotes: 2