Skip to content
Permalink
Browse files

Support dynamically loaded copies of jQuery using document ready. Fix…

…es #4889.
  • Loading branch information
jeresig committed Jul 22, 2009
1 parent fe80b5a commit 6fc57be843e2120ee6361af45b38d12a8c876f40
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/event.js
@@ -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

0 comments on commit 6fc57be

Please sign in to comment.
You can’t perform that action at this time.