aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2012-05-04 00:13:28 +0400
committerOleg <markelog@gmail.com>2012-05-04 00:18:08 +0400
commitbab6f5355cf8a02e1789d27d62defd78a7cdb1f4 (patch)
tree86eea4f7091a2181fe4bb5198c05f60c99462da7 /src/ajax.js
parent9cb1ab436d0a791518ebe7b401fd169c39a356d9 (diff)
downloadjquery-bab6f5355cf8a02e1789d27d62defd78a7cdb1f4.tar.gz
jquery-bab6f5355cf8a02e1789d27d62defd78a7cdb1f4.zip
-8 bytes
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 77e4d33e3..80e3b11df 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -165,10 +165,9 @@ jQuery.fn.extend({
return this;
}
- var selector, type,
+ var selector, type, response,
self = this,
- off = url.indexOf(" "),
- response;
+ off = url.indexOf(" ");
if ( off >= 0 ) {
selector = url.slice( off, url.length );
@@ -197,13 +196,13 @@ jQuery.fn.extend({
data: params,
complete: function( jqXHR, status ) {
if ( callback ) {
- self.each( callback, [ status === "success" ? response : jqXHR.responseText, status, jqXHR ] );
+ self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
}
}
}).done(function( responseText ) {
- // Save response text for use in complete callback
- response = responseText;
+ // Save response for use in complete callback
+ response = arguments;
// See if a selector was specified
self.html( selector ?