git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24e18d4
)
Require that, at least, document.body exists before firing the ready event. This...
author
John Resig
<jeresig@gmail.com>
Mon, 9 Nov 2009 12:47:53 +0000
(13:47 +0100)
committer
John Resig
<jeresig@gmail.com>
Mon, 9 Nov 2009 12:47:53 +0000
(13:47 +0100)
src/event.js
patch
|
blob
|
history
diff --git
a/src/event.js
b/src/event.js
index
1b4c539
..
7cfb535
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-791,6
+791,10
@@
jQuery.extend({
ready: function() {
// Make sure that the DOM is not already loaded
if ( !jQuery.isReady ) {
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 13 );
+ }
+
// Remember that the DOM is ready
jQuery.isReady = true;