From: John Resig Date: Fri, 15 Oct 2010 05:29:38 +0000 (-0400) Subject: Bringing back the change from 80a4178af9b12e6617bfcec818c538dfe08d3791, adapted to... X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;ds=sidebyside;h=497fc9849e91ba8602adf7908b4febf2d36bc1c8;p=jquery.git Bringing back the change from 80a4178af9b12e6617bfcec818c538dfe08d3791, adapted to handle both the function collision and the issue mentioned in #7196. --- diff --git a/src/ajax.js b/src/ajax.js index 1602ed2..a40e223 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -239,10 +239,6 @@ jQuery.extend({ var customJsonp = window[ jsonp ]; window[ jsonp ] = function( tmp ) { - data = tmp; - jQuery.handleSuccess( s, xhr, status, data ); - jQuery.handleComplete( s, xhr, status, data ); - if ( jQuery.isFunction( customJsonp ) ) { customJsonp( tmp ); @@ -254,6 +250,10 @@ jQuery.extend({ delete window[ jsonp ]; } catch( jsonpError ) {} } + + data = tmp; + jQuery.handleSuccess( s, xhr, status, data ); + jQuery.handleComplete( s, xhr, status, data ); if ( head ) { head.removeChild( script );