I have just updated to JQuery 1.5 and all my ajax calls that return JSON and a number of plugins instantly broke.
In my pre-1.5 code, I specified the dataType like:<
I came across this JQuery bug which fixes the problem http://bugs.jquery.com/ticket/8084.
Adding the following code after the JQuery script declaration fixes the problem:
$.ajaxSetup({ jsonp: null, jsonpCallback: null });
This problem is caused by the jQuery validation plugin and how it extends the ajaxSettings object for its own use (changes json calls to jsonp calls). There will hopefully be an official update to the validation plugin soon, but in the meantime, there's a patch available here that fixes the problem:
https://github.com/bigfix/jquery-validation/commit/9aa53f9241224ba349f9fe1b2c801be0f431b63b
Edit:
jQuery Validation Plugin, compatible with jQuery 1.5.1, available on git hub: https://github.com/jzaefferer/jquery-validation
Edit #2: jQuery Validation Plugin 1.8, compatible with jQuery 1.5.1 (and earlier) is released:
Read about it: http://bassistance.de/2011/03/25/release-validation-plugin-1-8/
Download it: http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Untested code, add this after jQuery is included, and before your custom code runs.
jQuery.ajaxSetup({
converters: {
"json": jQuery.parseJSON,
"* json": jQuery.parseJSON
}
});