mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Adds jQuery collection to objects that will be used as global events context if provided in the ajax options.
This commit is contained in:
parent
a2dbdc1f54
commit
5b421fed00
@ -365,8 +365,9 @@ jQuery.extend({
|
||||
( s.context = ( "context" in options ? options : jQuery.ajaxSettings ).context ) || s,
|
||||
// Context for global events
|
||||
// It's the callbackContext if one was provided in the options
|
||||
// and if it's a DOM node
|
||||
globalEventContext = callbackContext !== s && callbackContext.nodeType ?
|
||||
// and if it's a DOM node or a jQuery collection
|
||||
globalEventContext = callbackContext !== s &&
|
||||
( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
|
||||
jQuery( callbackContext ) : jQuery.event,
|
||||
// Deferreds
|
||||
deferred = jQuery.Deferred(),
|
||||
|
Loading…
Reference in New Issue
Block a user