]> source.dussan.org Git - jquery.git/commitdiff
Fix for #181
authorBrandon Aaron <brandon.aaron@gmail.com>
Wed, 15 Nov 2006 17:13:07 +0000 (17:13 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Wed, 15 Nov 2006 17:13:07 +0000 (17:13 +0000)
src/event/event.js

index 6d889836967004337a188bcced7930789b5154eb..19bb4f6a3528c513acba255283c4f7a24aa34c49 100644 (file)
@@ -1621,11 +1621,12 @@ new function(){
        
                // Use the defer script hack
                var script = document.getElementById("__ie_init");
-               script.onreadystatechange = function() {
-                       if ( this.readyState != "complete" ) return;
-                       this.parentNode.removeChild( this );
-                       jQuery.ready();
-               };
+               if (script) // script does not exist if jQuery is loaded dynamically
+                       script.onreadystatechange = function() {
+                               if ( this.readyState != "complete" ) return;
+                               this.parentNode.removeChild( this );
+                               jQuery.ready();
+                       };
        
                // Clear from memory
                script = null;