mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fixed the double-firing IE bug. (Ticket #13)
This commit is contained in:
parent
c43e1e379d
commit
5c7551e318
@ -46,12 +46,14 @@ $.$$ready = [];
|
||||
|
||||
// Handle when the DOM is ready
|
||||
$.ready = function() {
|
||||
$.$$isReady = true;
|
||||
if ( $.$$ready ) {
|
||||
for ( var i = 0; i < $.$$ready.length; i++ ) {
|
||||
$.apply( document, $.$$ready[i] );
|
||||
if ( !$.$$isReady ) {
|
||||
$.$$isReady = true;
|
||||
if ( $.$$ready ) {
|
||||
for ( var i = 0; i < $.$$ready.length; i++ ) {
|
||||
$.apply( document, $.$$ready[i] );
|
||||
}
|
||||
$.$$ready = [];
|
||||
}
|
||||
$.$$ready = [];
|
||||
}
|
||||
};
|
||||
|
||||
@ -82,7 +84,7 @@ if ( $.browser == "mozilla" || $.browser == "opera" ) {
|
||||
// If Safari is used
|
||||
} else if ( $.browser == "safari" ) {
|
||||
$.$$timer = setInterval(function(){
|
||||
if ( document.readyState == "loaded" ||
|
||||
if ( document.readyState == "loaded" ||
|
||||
document.readyState == "complete" ) {
|
||||
|
||||
clearInterval( $.$$timer );
|
||||
|
Loading…
Reference in New Issue
Block a user