Edit File by line
/home/barbar84/www/wp-inclu.../js/jquery
File: jquery.js
transport.abort( finalText );
[9500] Fix | Delete
}
[9501] Fix | Delete
done( 0, finalText );
[9502] Fix | Delete
return this;
[9503] Fix | Delete
}
[9504] Fix | Delete
};
[9505] Fix | Delete
[9506] Fix | Delete
// Attach deferreds
[9507] Fix | Delete
deferred.promise( jqXHR );
[9508] Fix | Delete
[9509] Fix | Delete
// Add protocol if not provided (prefilters might expect it)
[9510] Fix | Delete
// Handle falsy url in the settings object (#10093: consistency with old signature)
[9511] Fix | Delete
// We also use the url parameter if available
[9512] Fix | Delete
s.url = ( ( url || s.url || location.href ) + "" )
[9513] Fix | Delete
.replace( rprotocol, location.protocol + "//" );
[9514] Fix | Delete
[9515] Fix | Delete
// Alias method option to type as per ticket #12004
[9516] Fix | Delete
s.type = options.method || options.type || s.method || s.type;
[9517] Fix | Delete
[9518] Fix | Delete
// Extract dataTypes list
[9519] Fix | Delete
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
[9520] Fix | Delete
[9521] Fix | Delete
// A cross-domain request is in order when the origin doesn't match the current origin.
[9522] Fix | Delete
if ( s.crossDomain == null ) {
[9523] Fix | Delete
urlAnchor = document.createElement( "a" );
[9524] Fix | Delete
[9525] Fix | Delete
// Support: IE <=8 - 11, Edge 12 - 15
[9526] Fix | Delete
// IE throws exception on accessing the href property if url is malformed,
[9527] Fix | Delete
// e.g. http://example.com:80x/
[9528] Fix | Delete
try {
[9529] Fix | Delete
urlAnchor.href = s.url;
[9530] Fix | Delete
[9531] Fix | Delete
// Support: IE <=8 - 11 only
[9532] Fix | Delete
// Anchor's host property isn't correctly set when s.url is relative
[9533] Fix | Delete
urlAnchor.href = urlAnchor.href;
[9534] Fix | Delete
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
[9535] Fix | Delete
urlAnchor.protocol + "//" + urlAnchor.host;
[9536] Fix | Delete
} catch ( e ) {
[9537] Fix | Delete
[9538] Fix | Delete
// If there is an error parsing the URL, assume it is crossDomain,
[9539] Fix | Delete
// it can be rejected by the transport if it is invalid
[9540] Fix | Delete
s.crossDomain = true;
[9541] Fix | Delete
}
[9542] Fix | Delete
}
[9543] Fix | Delete
[9544] Fix | Delete
// Convert data if not already a string
[9545] Fix | Delete
if ( s.data && s.processData && typeof s.data !== "string" ) {
[9546] Fix | Delete
s.data = jQuery.param( s.data, s.traditional );
[9547] Fix | Delete
}
[9548] Fix | Delete
[9549] Fix | Delete
// Apply prefilters
[9550] Fix | Delete
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
[9551] Fix | Delete
[9552] Fix | Delete
// If request was aborted inside a prefilter, stop there
[9553] Fix | Delete
if ( completed ) {
[9554] Fix | Delete
return jqXHR;
[9555] Fix | Delete
}
[9556] Fix | Delete
[9557] Fix | Delete
// We can fire global events as of now if asked to
[9558] Fix | Delete
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
[9559] Fix | Delete
fireGlobals = jQuery.event && s.global;
[9560] Fix | Delete
[9561] Fix | Delete
// Watch for a new set of requests
[9562] Fix | Delete
if ( fireGlobals && jQuery.active++ === 0 ) {
[9563] Fix | Delete
jQuery.event.trigger( "ajaxStart" );
[9564] Fix | Delete
}
[9565] Fix | Delete
[9566] Fix | Delete
// Uppercase the type
[9567] Fix | Delete
s.type = s.type.toUpperCase();
[9568] Fix | Delete
[9569] Fix | Delete
// Determine if request has content
[9570] Fix | Delete
s.hasContent = !rnoContent.test( s.type );
[9571] Fix | Delete
[9572] Fix | Delete
// Save the URL in case we're toying with the If-Modified-Since
[9573] Fix | Delete
// and/or If-None-Match header later on
[9574] Fix | Delete
// Remove hash to simplify url manipulation
[9575] Fix | Delete
cacheURL = s.url.replace( rhash, "" );
[9576] Fix | Delete
[9577] Fix | Delete
// More options handling for requests with no content
[9578] Fix | Delete
if ( !s.hasContent ) {
[9579] Fix | Delete
[9580] Fix | Delete
// Remember the hash so we can put it back
[9581] Fix | Delete
uncached = s.url.slice( cacheURL.length );
[9582] Fix | Delete
[9583] Fix | Delete
// If data is available and should be processed, append data to url
[9584] Fix | Delete
if ( s.data && ( s.processData || typeof s.data === "string" ) ) {
[9585] Fix | Delete
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
[9586] Fix | Delete
[9587] Fix | Delete
// #9682: remove data so that it's not used in an eventual retry
[9588] Fix | Delete
delete s.data;
[9589] Fix | Delete
}
[9590] Fix | Delete
[9591] Fix | Delete
// Add or update anti-cache param if needed
[9592] Fix | Delete
if ( s.cache === false ) {
[9593] Fix | Delete
cacheURL = cacheURL.replace( rantiCache, "$1" );
[9594] Fix | Delete
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) +
[9595] Fix | Delete
uncached;
[9596] Fix | Delete
}
[9597] Fix | Delete
[9598] Fix | Delete
// Put hash and anti-cache on the URL that will be requested (gh-1732)
[9599] Fix | Delete
s.url = cacheURL + uncached;
[9600] Fix | Delete
[9601] Fix | Delete
// Change '%20' to '+' if this is encoded form body content (gh-2658)
[9602] Fix | Delete
} else if ( s.data && s.processData &&
[9603] Fix | Delete
( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
[9604] Fix | Delete
s.data = s.data.replace( r20, "+" );
[9605] Fix | Delete
}
[9606] Fix | Delete
[9607] Fix | Delete
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
[9608] Fix | Delete
if ( s.ifModified ) {
[9609] Fix | Delete
if ( jQuery.lastModified[ cacheURL ] ) {
[9610] Fix | Delete
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
[9611] Fix | Delete
}
[9612] Fix | Delete
if ( jQuery.etag[ cacheURL ] ) {
[9613] Fix | Delete
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
[9614] Fix | Delete
}
[9615] Fix | Delete
}
[9616] Fix | Delete
[9617] Fix | Delete
// Set the correct header, if data is being sent
[9618] Fix | Delete
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
[9619] Fix | Delete
jqXHR.setRequestHeader( "Content-Type", s.contentType );
[9620] Fix | Delete
}
[9621] Fix | Delete
[9622] Fix | Delete
// Set the Accepts header for the server, depending on the dataType
[9623] Fix | Delete
jqXHR.setRequestHeader(
[9624] Fix | Delete
"Accept",
[9625] Fix | Delete
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
[9626] Fix | Delete
s.accepts[ s.dataTypes[ 0 ] ] +
[9627] Fix | Delete
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
[9628] Fix | Delete
s.accepts[ "*" ]
[9629] Fix | Delete
);
[9630] Fix | Delete
[9631] Fix | Delete
// Check for headers option
[9632] Fix | Delete
for ( i in s.headers ) {
[9633] Fix | Delete
jqXHR.setRequestHeader( i, s.headers[ i ] );
[9634] Fix | Delete
}
[9635] Fix | Delete
[9636] Fix | Delete
// Allow custom headers/mimetypes and early abort
[9637] Fix | Delete
if ( s.beforeSend &&
[9638] Fix | Delete
( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
[9639] Fix | Delete
[9640] Fix | Delete
// Abort if not done already and return
[9641] Fix | Delete
return jqXHR.abort();
[9642] Fix | Delete
}
[9643] Fix | Delete
[9644] Fix | Delete
// Aborting is no longer a cancellation
[9645] Fix | Delete
strAbort = "abort";
[9646] Fix | Delete
[9647] Fix | Delete
// Install callbacks on deferreds
[9648] Fix | Delete
completeDeferred.add( s.complete );
[9649] Fix | Delete
jqXHR.done( s.success );
[9650] Fix | Delete
jqXHR.fail( s.error );
[9651] Fix | Delete
[9652] Fix | Delete
// Get transport
[9653] Fix | Delete
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
[9654] Fix | Delete
[9655] Fix | Delete
// If no transport, we auto-abort
[9656] Fix | Delete
if ( !transport ) {
[9657] Fix | Delete
done( -1, "No Transport" );
[9658] Fix | Delete
} else {
[9659] Fix | Delete
jqXHR.readyState = 1;
[9660] Fix | Delete
[9661] Fix | Delete
// Send global event
[9662] Fix | Delete
if ( fireGlobals ) {
[9663] Fix | Delete
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
[9664] Fix | Delete
}
[9665] Fix | Delete
[9666] Fix | Delete
// If request was aborted inside ajaxSend, stop there
[9667] Fix | Delete
if ( completed ) {
[9668] Fix | Delete
return jqXHR;
[9669] Fix | Delete
}
[9670] Fix | Delete
[9671] Fix | Delete
// Timeout
[9672] Fix | Delete
if ( s.async && s.timeout > 0 ) {
[9673] Fix | Delete
timeoutTimer = window.setTimeout( function() {
[9674] Fix | Delete
jqXHR.abort( "timeout" );
[9675] Fix | Delete
}, s.timeout );
[9676] Fix | Delete
}
[9677] Fix | Delete
[9678] Fix | Delete
try {
[9679] Fix | Delete
completed = false;
[9680] Fix | Delete
transport.send( requestHeaders, done );
[9681] Fix | Delete
} catch ( e ) {
[9682] Fix | Delete
[9683] Fix | Delete
// Rethrow post-completion exceptions
[9684] Fix | Delete
if ( completed ) {
[9685] Fix | Delete
throw e;
[9686] Fix | Delete
}
[9687] Fix | Delete
[9688] Fix | Delete
// Propagate others as results
[9689] Fix | Delete
done( -1, e );
[9690] Fix | Delete
}
[9691] Fix | Delete
}
[9692] Fix | Delete
[9693] Fix | Delete
// Callback for when everything is done
[9694] Fix | Delete
function done( status, nativeStatusText, responses, headers ) {
[9695] Fix | Delete
var isSuccess, success, error, response, modified,
[9696] Fix | Delete
statusText = nativeStatusText;
[9697] Fix | Delete
[9698] Fix | Delete
// Ignore repeat invocations
[9699] Fix | Delete
if ( completed ) {
[9700] Fix | Delete
return;
[9701] Fix | Delete
}
[9702] Fix | Delete
[9703] Fix | Delete
completed = true;
[9704] Fix | Delete
[9705] Fix | Delete
// Clear timeout if it exists
[9706] Fix | Delete
if ( timeoutTimer ) {
[9707] Fix | Delete
window.clearTimeout( timeoutTimer );
[9708] Fix | Delete
}
[9709] Fix | Delete
[9710] Fix | Delete
// Dereference transport for early garbage collection
[9711] Fix | Delete
// (no matter how long the jqXHR object will be used)
[9712] Fix | Delete
transport = undefined;
[9713] Fix | Delete
[9714] Fix | Delete
// Cache response headers
[9715] Fix | Delete
responseHeadersString = headers || "";
[9716] Fix | Delete
[9717] Fix | Delete
// Set readyState
[9718] Fix | Delete
jqXHR.readyState = status > 0 ? 4 : 0;
[9719] Fix | Delete
[9720] Fix | Delete
// Determine if successful
[9721] Fix | Delete
isSuccess = status >= 200 && status < 300 || status === 304;
[9722] Fix | Delete
[9723] Fix | Delete
// Get response data
[9724] Fix | Delete
if ( responses ) {
[9725] Fix | Delete
response = ajaxHandleResponses( s, jqXHR, responses );
[9726] Fix | Delete
}
[9727] Fix | Delete
[9728] Fix | Delete
// Use a noop converter for missing script
[9729] Fix | Delete
if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
[9730] Fix | Delete
s.converters[ "text script" ] = function() {};
[9731] Fix | Delete
}
[9732] Fix | Delete
[9733] Fix | Delete
// Convert no matter what (that way responseXXX fields are always set)
[9734] Fix | Delete
response = ajaxConvert( s, response, jqXHR, isSuccess );
[9735] Fix | Delete
[9736] Fix | Delete
// If successful, handle type chaining
[9737] Fix | Delete
if ( isSuccess ) {
[9738] Fix | Delete
[9739] Fix | Delete
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
[9740] Fix | Delete
if ( s.ifModified ) {
[9741] Fix | Delete
modified = jqXHR.getResponseHeader( "Last-Modified" );
[9742] Fix | Delete
if ( modified ) {
[9743] Fix | Delete
jQuery.lastModified[ cacheURL ] = modified;
[9744] Fix | Delete
}
[9745] Fix | Delete
modified = jqXHR.getResponseHeader( "etag" );
[9746] Fix | Delete
if ( modified ) {
[9747] Fix | Delete
jQuery.etag[ cacheURL ] = modified;
[9748] Fix | Delete
}
[9749] Fix | Delete
}
[9750] Fix | Delete
[9751] Fix | Delete
// if no content
[9752] Fix | Delete
if ( status === 204 || s.type === "HEAD" ) {
[9753] Fix | Delete
statusText = "nocontent";
[9754] Fix | Delete
[9755] Fix | Delete
// if not modified
[9756] Fix | Delete
} else if ( status === 304 ) {
[9757] Fix | Delete
statusText = "notmodified";
[9758] Fix | Delete
[9759] Fix | Delete
// If we have data, let's convert it
[9760] Fix | Delete
} else {
[9761] Fix | Delete
statusText = response.state;
[9762] Fix | Delete
success = response.data;
[9763] Fix | Delete
error = response.error;
[9764] Fix | Delete
isSuccess = !error;
[9765] Fix | Delete
}
[9766] Fix | Delete
} else {
[9767] Fix | Delete
[9768] Fix | Delete
// Extract error from statusText and normalize for non-aborts
[9769] Fix | Delete
error = statusText;
[9770] Fix | Delete
if ( status || !statusText ) {
[9771] Fix | Delete
statusText = "error";
[9772] Fix | Delete
if ( status < 0 ) {
[9773] Fix | Delete
status = 0;
[9774] Fix | Delete
}
[9775] Fix | Delete
}
[9776] Fix | Delete
}
[9777] Fix | Delete
[9778] Fix | Delete
// Set data for the fake xhr object
[9779] Fix | Delete
jqXHR.status = status;
[9780] Fix | Delete
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
[9781] Fix | Delete
[9782] Fix | Delete
// Success/Error
[9783] Fix | Delete
if ( isSuccess ) {
[9784] Fix | Delete
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
[9785] Fix | Delete
} else {
[9786] Fix | Delete
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
[9787] Fix | Delete
}
[9788] Fix | Delete
[9789] Fix | Delete
// Status-dependent callbacks
[9790] Fix | Delete
jqXHR.statusCode( statusCode );
[9791] Fix | Delete
statusCode = undefined;
[9792] Fix | Delete
[9793] Fix | Delete
if ( fireGlobals ) {
[9794] Fix | Delete
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
[9795] Fix | Delete
[ jqXHR, s, isSuccess ? success : error ] );
[9796] Fix | Delete
}
[9797] Fix | Delete
[9798] Fix | Delete
// Complete
[9799] Fix | Delete
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
[9800] Fix | Delete
[9801] Fix | Delete
if ( fireGlobals ) {
[9802] Fix | Delete
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
[9803] Fix | Delete
[9804] Fix | Delete
// Handle the global AJAX counter
[9805] Fix | Delete
if ( !( --jQuery.active ) ) {
[9806] Fix | Delete
jQuery.event.trigger( "ajaxStop" );
[9807] Fix | Delete
}
[9808] Fix | Delete
}
[9809] Fix | Delete
}
[9810] Fix | Delete
[9811] Fix | Delete
return jqXHR;
[9812] Fix | Delete
},
[9813] Fix | Delete
[9814] Fix | Delete
getJSON: function( url, data, callback ) {
[9815] Fix | Delete
return jQuery.get( url, data, callback, "json" );
[9816] Fix | Delete
},
[9817] Fix | Delete
[9818] Fix | Delete
getScript: function( url, callback ) {
[9819] Fix | Delete
return jQuery.get( url, undefined, callback, "script" );
[9820] Fix | Delete
}
[9821] Fix | Delete
} );
[9822] Fix | Delete
[9823] Fix | Delete
jQuery.each( [ "get", "post" ], function( _i, method ) {
[9824] Fix | Delete
jQuery[ method ] = function( url, data, callback, type ) {
[9825] Fix | Delete
[9826] Fix | Delete
// Shift arguments if data argument was omitted
[9827] Fix | Delete
if ( isFunction( data ) ) {
[9828] Fix | Delete
type = type || callback;
[9829] Fix | Delete
callback = data;
[9830] Fix | Delete
data = undefined;
[9831] Fix | Delete
}
[9832] Fix | Delete
[9833] Fix | Delete
// The url can be an options object (which then must have .url)
[9834] Fix | Delete
return jQuery.ajax( jQuery.extend( {
[9835] Fix | Delete
url: url,
[9836] Fix | Delete
type: method,
[9837] Fix | Delete
dataType: type,
[9838] Fix | Delete
data: data,
[9839] Fix | Delete
success: callback
[9840] Fix | Delete
}, jQuery.isPlainObject( url ) && url ) );
[9841] Fix | Delete
};
[9842] Fix | Delete
} );
[9843] Fix | Delete
[9844] Fix | Delete
jQuery.ajaxPrefilter( function( s ) {
[9845] Fix | Delete
var i;
[9846] Fix | Delete
for ( i in s.headers ) {
[9847] Fix | Delete
if ( i.toLowerCase() === "content-type" ) {
[9848] Fix | Delete
s.contentType = s.headers[ i ] || "";
[9849] Fix | Delete
}
[9850] Fix | Delete
}
[9851] Fix | Delete
} );
[9852] Fix | Delete
[9853] Fix | Delete
[9854] Fix | Delete
jQuery._evalUrl = function( url, options, doc ) {
[9855] Fix | Delete
return jQuery.ajax( {
[9856] Fix | Delete
url: url,
[9857] Fix | Delete
[9858] Fix | Delete
// Make this explicit, since user can override this through ajaxSetup (#11264)
[9859] Fix | Delete
type: "GET",
[9860] Fix | Delete
dataType: "script",
[9861] Fix | Delete
cache: true,
[9862] Fix | Delete
async: false,
[9863] Fix | Delete
global: false,
[9864] Fix | Delete
[9865] Fix | Delete
// Only evaluate the response if it is successful (gh-4126)
[9866] Fix | Delete
// dataFilter is not invoked for failure responses, so using it instead
[9867] Fix | Delete
// of the default converter is kludgy but it works.
[9868] Fix | Delete
converters: {
[9869] Fix | Delete
"text script": function() {}
[9870] Fix | Delete
},
[9871] Fix | Delete
dataFilter: function( response ) {
[9872] Fix | Delete
jQuery.globalEval( response, options, doc );
[9873] Fix | Delete
}
[9874] Fix | Delete
} );
[9875] Fix | Delete
};
[9876] Fix | Delete
[9877] Fix | Delete
[9878] Fix | Delete
jQuery.fn.extend( {
[9879] Fix | Delete
wrapAll: function( html ) {
[9880] Fix | Delete
var wrap;
[9881] Fix | Delete
[9882] Fix | Delete
if ( this[ 0 ] ) {
[9883] Fix | Delete
if ( isFunction( html ) ) {
[9884] Fix | Delete
html = html.call( this[ 0 ] );
[9885] Fix | Delete
}
[9886] Fix | Delete
[9887] Fix | Delete
// The elements to wrap the target around
[9888] Fix | Delete
wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
[9889] Fix | Delete
[9890] Fix | Delete
if ( this[ 0 ].parentNode ) {
[9891] Fix | Delete
wrap.insertBefore( this[ 0 ] );
[9892] Fix | Delete
}
[9893] Fix | Delete
[9894] Fix | Delete
wrap.map( function() {
[9895] Fix | Delete
var elem = this;
[9896] Fix | Delete
[9897] Fix | Delete
while ( elem.firstElementChild ) {
[9898] Fix | Delete
elem = elem.firstElementChild;
[9899] Fix | Delete
}
[9900] Fix | Delete
[9901] Fix | Delete
return elem;
[9902] Fix | Delete
} ).append( this );
[9903] Fix | Delete
}
[9904] Fix | Delete
[9905] Fix | Delete
return this;
[9906] Fix | Delete
},
[9907] Fix | Delete
[9908] Fix | Delete
wrapInner: function( html ) {
[9909] Fix | Delete
if ( isFunction( html ) ) {
[9910] Fix | Delete
return this.each( function( i ) {
[9911] Fix | Delete
jQuery( this ).wrapInner( html.call( this, i ) );
[9912] Fix | Delete
} );
[9913] Fix | Delete
}
[9914] Fix | Delete
[9915] Fix | Delete
return this.each( function() {
[9916] Fix | Delete
var self = jQuery( this ),
[9917] Fix | Delete
contents = self.contents();
[9918] Fix | Delete
[9919] Fix | Delete
if ( contents.length ) {
[9920] Fix | Delete
contents.wrapAll( html );
[9921] Fix | Delete
[9922] Fix | Delete
} else {
[9923] Fix | Delete
self.append( html );
[9924] Fix | Delete
}
[9925] Fix | Delete
} );
[9926] Fix | Delete
},
[9927] Fix | Delete
[9928] Fix | Delete
wrap: function( html ) {
[9929] Fix | Delete
var htmlIsFunction = isFunction( html );
[9930] Fix | Delete
[9931] Fix | Delete
return this.each( function( i ) {
[9932] Fix | Delete
jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );
[9933] Fix | Delete
} );
[9934] Fix | Delete
},
[9935] Fix | Delete
[9936] Fix | Delete
unwrap: function( selector ) {
[9937] Fix | Delete
this.parent( selector ).not( "body" ).each( function() {
[9938] Fix | Delete
jQuery( this ).replaceWith( this.childNodes );
[9939] Fix | Delete
} );
[9940] Fix | Delete
return this;
[9941] Fix | Delete
}
[9942] Fix | Delete
} );
[9943] Fix | Delete
[9944] Fix | Delete
[9945] Fix | Delete
jQuery.expr.pseudos.hidden = function( elem ) {
[9946] Fix | Delete
return !jQuery.expr.pseudos.visible( elem );
[9947] Fix | Delete
};
[9948] Fix | Delete
jQuery.expr.pseudos.visible = function( elem ) {
[9949] Fix | Delete
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
[9950] Fix | Delete
};
[9951] Fix | Delete
[9952] Fix | Delete
[9953] Fix | Delete
[9954] Fix | Delete
[9955] Fix | Delete
jQuery.ajaxSettings.xhr = function() {
[9956] Fix | Delete
try {
[9957] Fix | Delete
return new window.XMLHttpRequest();
[9958] Fix | Delete
} catch ( e ) {}
[9959] Fix | Delete
};
[9960] Fix | Delete
[9961] Fix | Delete
var xhrSuccessStatus = {
[9962] Fix | Delete
[9963] Fix | Delete
// File protocol always yields status code 0, assume 200
[9964] Fix | Delete
0: 200,
[9965] Fix | Delete
[9966] Fix | Delete
// Support: IE <=9 only
[9967] Fix | Delete
// #1450: sometimes IE returns 1223 when it should be 204
[9968] Fix | Delete
1223: 204
[9969] Fix | Delete
},
[9970] Fix | Delete
xhrSupported = jQuery.ajaxSettings.xhr();
[9971] Fix | Delete
[9972] Fix | Delete
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
[9973] Fix | Delete
support.ajax = xhrSupported = !!xhrSupported;
[9974] Fix | Delete
[9975] Fix | Delete
jQuery.ajaxTransport( function( options ) {
[9976] Fix | Delete
var callback, errorCallback;
[9977] Fix | Delete
[9978] Fix | Delete
// Cross domain only allowed if supported through XMLHttpRequest
[9979] Fix | Delete
if ( support.cors || xhrSupported && !options.crossDomain ) {
[9980] Fix | Delete
return {
[9981] Fix | Delete
send: function( headers, complete ) {
[9982] Fix | Delete
var i,
[9983] Fix | Delete
xhr = options.xhr();
[9984] Fix | Delete
[9985] Fix | Delete
xhr.open(
[9986] Fix | Delete
options.type,
[9987] Fix | Delete
options.url,
[9988] Fix | Delete
options.async,
[9989] Fix | Delete
options.username,
[9990] Fix | Delete
options.password
[9991] Fix | Delete
);
[9992] Fix | Delete
[9993] Fix | Delete
// Apply custom fields if provided
[9994] Fix | Delete
if ( options.xhrFields ) {
[9995] Fix | Delete
for ( i in options.xhrFields ) {
[9996] Fix | Delete
xhr[ i ] = options.xhrFields[ i ];
[9997] Fix | Delete
}
[9998] Fix | Delete
}
[9999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function