aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Snover <github.com@zetafleet.com>2011-02-07 10:52:33 -0600
committerColin Snover <github.com@zetafleet.com>2011-02-07 10:52:33 -0600
commit8805f1373d321d7e80e1984bd7e9a3e5d8e50943 (patch)
treefcb5b08042b4fba8afe170da3b1b16e86a1a29fc
parent7acb141ed7f2dedd950bb65acf878098640d081e (diff)
parent5b421fed003e6704bd0fbba2dea5c1b6add2cf52 (diff)
downloadjquery-8805f1373d321d7e80e1984bd7e9a3e5d8e50943.tar.gz
jquery-8805f1373d321d7e80e1984bd7e9a3e5d8e50943.zip
Merge branch 'master' of github.com:jquery/jquery into jquery-master
-rw-r--r--src/ajax.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 2b6b80f90..76f983499 100644
--- a/src/ajax.js
+++ b/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(),