Fix for IE firing document ready too soon (Bug #1320).
authorJohn Resig <jeresig@gmail.com>
Thu, 12 Jul 2007 20:33:05 +0000 (20:33 +0000)
committerJohn Resig <jeresig@gmail.com>
Thu, 12 Jul 2007 20:33:05 +0000 (20:33 +0000)
src/event/event.js

index 5d8e89a..f7cc993 100644 (file)
@@ -954,7 +954,7 @@ new function(){
                // script does not exist if jQuery is loaded dynamically
                if ( script ) 
                        script.onreadystatechange = function() {
                // script does not exist if jQuery is loaded dynamically
                if ( script ) 
                        script.onreadystatechange = function() {
-                               if ( this.readyState != "complete" ) return;
+                               if ( document.readyState != "complete" ) return;
                                jQuery.ready();
                        };
        
                                jQuery.ready();
                        };