mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Support dynamically loaded copies of jQuery using document ready. Fixes #4889.
This commit is contained in:
parent
fe80b5af45
commit
6fc57be843
@ -715,6 +715,12 @@ function bindReady() {
|
||||
if ( readyBound ) return;
|
||||
readyBound = true;
|
||||
|
||||
// Catch cases where $(document).ready() is called after the
|
||||
// browser event has already occurred.
|
||||
if ( document.readyState === "complete" ) {
|
||||
return jQuery.ready();
|
||||
}
|
||||
|
||||
// Mozilla, Opera and webkit nightlies currently support this event
|
||||
if ( document.addEventListener ) {
|
||||
// Use the handy event callback
|
||||
|
Loading…
Reference in New Issue
Block a user