ajaxSetup: function( settings ) {
jQuery.extend( true, jQuery.ajaxSettings, settings );
+ return this;
},
ajaxSettings: {
}
// Get transport
- transport = jQuery.ajax.prefilter( s , options ).transport( s );
+ transport = jQuery.ajaxPrefilter( s , options ).ajaxTransport( s );
// Watch for a new set of requests
if ( s.global && jQuery.active++ === 0 ) {
}
}
- return noSelect ? jQuery.ajax : selected;
+ return noSelect ? jQuery : selected;
}
// Add an element to one of the structures in ajaxSettings
}
}
- return jQuery.ajax;
+ return jQuery;
}
// Install prefilter & transport methods
-jQuery.each( [ "prefilter" , "transport" ] , function( _ , name ) {
- _ = name + "s";
- jQuery.ajax[ name ] = function() {
+jQuery.each( [ "Prefilter" , "Transport" ] , function( _ , name ) {
+ _ = name.toLowerCase() + "s";
+ jQuery[ "ajax" + name ] = function() {
return ajax_addElement( _ , arguments );
};
} );
jsonpCallback: function() {
return "jsonp" + jsc++;
}
-});
// Normalize jsonp queries
// 1) put callback parameter in url or data
// 2) sneakily ensure transportDataType is always jsonp for jsonp requests
-jQuery.ajax.prefilter("json jsonp", function(s, originalSettings) {
+}).ajaxPrefilter("json jsonp", function(s, originalSettings) {
if ( s.dataTypes[ 0 ] === "jsonp" ||
originalSettings.jsonp ||
}
// Bind transport to jsonp dataType
-}).transport("jsonp", function(s) {
+}).ajaxTransport("jsonp", function(s) {
// Put callback in place
var responseContainer,
converters: {
"text script": jQuery.globalEval
}
-});
// Bind script tag hack transport
-jQuery.ajax.transport("script", function(s) {
+}).ajaxTransport("script", function(s) {
// Handle cache special case
if ( s.cache === undefined ) {
xhrUnloadAbortInstalled;
-jQuery.ajax.transport( function( s , determineDataType ) {
+jQuery.ajaxTransport( function( s , determineDataType ) {
// Cross domain only allowed if supported through XMLHttpRequest
if ( ! s.crossDomain || jQuery.support.cors ) {