aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-09-23 11:38:22 -0400
committerjeresig <jeresig@gmail.com>2010-09-23 11:38:22 -0400
commite270d804b4cee58dbf438251e9becb6f0f2ac123 (patch)
tree1808abb39d14c9bb84f58b4852615bb2e45bc36c /src
parent2f603359fecca5b4873c45775b293702a2c651e3 (diff)
downloadjquery-e270d804b4cee58dbf438251e9becb6f0f2ac123.tar.gz
jquery-e270d804b4cee58dbf438251e9becb6f0f2ac123.zip
Delay the result of the readyState check to give scripts the opportunity to delay ready, as described by @jrburke in 747ba7defd82bffa6c7ccb69e53b834cbfddb62c.
Diffstat (limited to 'src')
-rw-r--r--src/core.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core.js b/src/core.js
index b747e5bea..f6a07eb8b 100644
--- a/src/core.js
+++ b/src/core.js
@@ -429,7 +429,8 @@ jQuery.extend({
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if ( document.readyState === "complete" ) {
- return jQuery.ready();
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 13 );
}
// Mozilla, Opera and webkit nightlies currently support this event