Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 203 additions & 203 deletions 1.2.3/dist/jquery.js

Large diffs are not rendered by default.

406 changes: 203 additions & 203 deletions 1.2.3/dist/jquery.lite.js

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions 1.2.3/src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jQuery.fn.extend({
jQuery.makeArray(this.elements) : this;
})
.filter(function(){
return this.name && !this.disabled &&
(this.checked || /select|textarea/i.test(this.nodeName) ||
return this.name && !this.disabled &&
(this.checked || /select|textarea/i.test(this.nodeName) ||
/text|hidden|password/i.test(this.type));
})
.map(function(i, elem){
Expand Down Expand Up @@ -100,7 +100,7 @@ jQuery.extend({
callback = data;
data = null;
}

return jQuery.ajax({
type: "GET",
url: url,
Expand Down Expand Up @@ -156,7 +156,7 @@ jQuery.extend({
_default: "*/*"
}
},

// Last-Modified header cache for next request
lastModified: {},

Expand Down Expand Up @@ -245,7 +245,7 @@ jQuery.extend({

// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(){
if ( !done && (!this.readyState ||
if ( !done && (!this.readyState ||
this.readyState == "loaded" || this.readyState == "complete") ) {
done = true;
success();
Expand Down Expand Up @@ -293,7 +293,7 @@ jQuery.extend({
// Allow custom headers/mimetypes
if ( s.beforeSend )
s.beforeSend(xml);

if ( s.global )
jQuery.event.trigger("ajaxSend", [xml, s]);

Expand All @@ -302,13 +302,13 @@ jQuery.extend({
// The transfer is complete and the data is available, or the request timed out
if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
requestDone = true;

// clear poll interval
if (ival) {
clearInterval(ival);
ival = null;
}

status = isTimeout == "timeout" && "timeout" ||
!jQuery.httpSuccess( xml ) && "error" ||
s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
Expand All @@ -331,13 +331,13 @@ jQuery.extend({
try {
modRes = xml.getResponseHeader("Last-Modified");
} catch(e) {} // swallow exception thrown by FF if header is not available

if ( s.ifModified && modRes )
jQuery.lastModified[s.url] = modRes;

// JSONP handles its own success callback
if ( !jsonp )
success();
success();
} else
jQuery.handleError(s, xml, status);

Expand All @@ -349,10 +349,10 @@ jQuery.extend({
xml = null;
}
};

if ( s.async ) {
// don't attach the handler to the request, just poll it instead
var ival = setInterval(onreadystatechange, 13);
var ival = setInterval(onreadystatechange, 13);

// Timeout checker
if ( s.timeout > 0 )
Expand All @@ -361,20 +361,20 @@ jQuery.extend({
if ( xml ) {
// Cancel the request
xml.abort();

if( !requestDone )
onreadystatechange( "timeout" );
}
}, s.timeout);
}

// Send the data
try {
xml.send(s.data);
} catch(e) {
jQuery.handleError(s, xml, null, e);
}

// firefox 1.5 doesn't fire statechange for sync requests
if ( !s.async )
onreadystatechange();
Expand Down Expand Up @@ -402,7 +402,7 @@ jQuery.extend({
if ( s.global && ! --jQuery.active )
jQuery.event.trigger( "ajaxStop" );
}

// return XMLHttpRequest to allow aborting the request etc.
return xml;
},
Expand Down
Loading