X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fevent.js;h=1468d0c59b3947fac0fdebec0a9407555a5e0d7e;hb=231c8756788f085d04c6120c12eaa66766abfa3f;hp=e2087cc13cbdf77f7ff59056aeda292793458ced;hpb=5cb1163469fb2c9cd80712cd5481b29055821022;p=jquery.git diff --git a/src/event.js b/src/event.js index e2087cc..1468d0c 100644 --- a/src/event.js +++ b/src/event.js @@ -849,10 +849,15 @@ function bindReady() { } }); - // If IE and not an iframe + // If IE and not a frame // continually check to see if the document is ready - // NOTE: DO NOT CHANGE TO ===, FAILS IN IE. - if ( document.documentElement.doScroll && window == window.top ) (function() { + var toplevel = false; + + try { + toplevel = window.frameElement === undefined; + } catch(e){} + + if ( document.documentElement.doScroll && toplevel ) (function() { if ( jQuery.isReady ) { return; }