Require that, at least, document.body exists before firing the ready event. This...
[jquery.git] / src / event.js
index 1b4c539..7cfb535 100644 (file)
@@ -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;