Skip to content
Permalink
Browse files
DOMContentLoaded works in Opera 9b2+, so I have it firing for that no…
…w too - the means that there is a DOM Ready solution for every major browser! (Older version of Opera simply fallback to window.onload)
  • Loading branch information
jeresig committed Jun 16, 2006
1 parent 66bd98b commit 9b7bbc619b4fe328188d9f12a438e148436fc9a6
Showing 1 changed file with 3 additions and 3 deletions.
@@ -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" ) {

0 comments on commit 9b7bbc6

Please sign in to comment.