DOMContentLoaded works in Opera 9b2+, so I have it firing for that now too - the...
authorJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 04:23:30 +0000 (04:23 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 16 Jun 2006 04:23:30 +0000 (04:23 +0000)
event/event.js

index b705dba..a78e1a9 100644 (file)
@@ -56,7 +56,7 @@ $.ready = function() {
 };
 
 // If Mozilla is used
-if ( $.browser == "mozilla" ) {
+if ( $.browser == "mozilla" || $.browser == "opera" ) {
        // Use the handy event callback
        document.addEventListener( "DOMContentLoaded", $.ready, null );
 
@@ -79,8 +79,8 @@ if ( $.browser == "mozilla" ) {
        // Clear from memory
        script = null;
 
-// If Safari or Opera is used
-} else {
+// If Safari  is used
+} else if ( $.browser == "safari" ) {
        $.$$timer = setInterval(function(){
                 if ( document.readyState == "loaded" || 
                        document.readyState == "complete" ) {