Cleans up and simplifies code shared by ajaxPrefilter and ajaxTransport. Removes...
[jquery.git] / src / ajax / jsonp.js
index 883876f..ff8d1f1 100644 (file)
@@ -9,10 +9,11 @@ jQuery.ajaxSetup({
        jsonpCallback: function() {
                return "jsonp" + jsc++;
        }
+});
 
 // Detect, normalize options and install callbacks for jsonp requests
 // (dataIsString is used internally)
-}).ajaxPrefilter("json jsonp", function(s, originalSettings, dataIsString) {
+jQuery.ajaxPrefilter("json jsonp", function(s, originalSettings, dataIsString) {
 
        dataIsString = ( typeof(s.data) === "string" );