X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax.js;h=76f983499e811e959f260ef479ca3711f66dd928;hp=2b6b80f9016c8edf70504485f7441a4cdac610cc;hb=5b421fed003e6704bd0fbba2dea5c1b6add2cf52;hpb=a2dbdc1f5438a857c2a9898bd36e4b2de685742e diff --git a/src/ajax.js b/src/ajax.js index 2b6b80f..76f9834 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(),