Skip to content
Permalink
Browse files

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

…context if provided in the ajax options.
  • Loading branch information
jaubourg committed Feb 7, 2011
1 parent a2dbdc1 commit 5b421fed003e6704bd0fbba2dea5c1b6add2cf52
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/ajax.js
@@ -365,9 +365,10 @@ 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 ?
jQuery( callbackContext ) : jQuery.event,
// 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(),
completeDeferred = jQuery._Deferred(),

0 comments on commit 5b421fe

Please sign in to comment.
You can’t perform that action at this time.