Commit 5b421fed authored by jaubourg's avatar jaubourg

Adds jQuery collection to objects that will be used as global events context...

Adds jQuery collection to objects that will be used as global events context if provided in the ajax options.
parent a2dbdc1f
...@@ -365,9 +365,10 @@ jQuery.extend({ ...@@ -365,9 +365,10 @@ jQuery.extend({
( s.context = ( "context" in options ? options : jQuery.ajaxSettings ).context ) || s, ( s.context = ( "context" in options ? options : jQuery.ajaxSettings ).context ) || s,
// Context for global events // Context for global events
// It's the callbackContext if one was provided in the options // It's the callbackContext if one was provided in the options
// and if it's a DOM node // and if it's a DOM node or a jQuery collection
globalEventContext = callbackContext !== s && callbackContext.nodeType ? globalEventContext = callbackContext !== s &&
jQuery( callbackContext ) : jQuery.event, ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
jQuery( callbackContext ) : jQuery.event,
// Deferreds // Deferreds
deferred = jQuery.Deferred(), deferred = jQuery.Deferred(),
completeDeferred = jQuery._Deferred(), completeDeferred = jQuery._Deferred(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment