X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=a40e223e76dd599790c08e18c086a11feb268922;hb=497fc9849e91ba8602adf7908b4febf2d36bc1c8;hp=1602ed25a5ef6a20444e23a62e513f319da55405;hpb=091c481acaff96763596a82b423fbfd96f3332db;p=jquery.git 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 );