+ // Status-dependent callbacks
+ jXHR.statusCode = function( map ) {
+ if ( map ) {
+ var resolved = jXHR.isResolved(),
+ tmp;
+ if ( resolved || jXHR.isRejected() ) {
+ tmp = map[ jXHR.status ];
+ if ( tmp ) {
+ if ( map === statusCode ) {
+ delete statusCode[ jXHR.status ];
+ }
+ jXHR[ resolved ? "done" : "fail" ]( tmp );
+ }
+ } else {
+ for( tmp in map ) {
+ statusCode[ tmp ] = [ statusCode[ tmp ] , map[ tmp ] ];
+ }
+ }
+ }
+ return this;
+ };
+