Skip to content
Permalink
Browse files

Increase the speed of the single setTimeout calls for the ready event.

  • Loading branch information
jeresig committed Sep 24, 2010
1 parent 6dfdb14 commit a220c81eb9d65b514fcf3090a0aae75dadf5d371
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core.js
@@ -397,7 +397,7 @@ jQuery.extend({
if ( !jQuery.readyWait || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( jQuery.ready, 13 );
return setTimeout( jQuery.ready, 1 );
}

// Remember that the DOM is ready
@@ -438,7 +438,7 @@ jQuery.extend({
// browser event has already occurred.
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout( jQuery.ready, 13 );
return setTimeout( jQuery.ready, 1 );
}

// Mozilla, Opera and webkit nightlies currently support this event

0 comments on commit a220c81

Please sign in to comment.
You can’t perform that action at this time.