aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core.js19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core.js b/src/core.js
index 8940ada2b..9e1bfc67f 100644
--- a/src/core.js
+++ b/src/core.js
@@ -417,18 +417,21 @@ jQuery.extend({
// If there are functions bound, to execute
if ( readyList ) {
// Execute all of them
- var fn, i = 0;
- while ( (fn = readyList[ i++ ]) ) {
- fn.call( document, jQuery );
- }
+ var fn,
+ i = 0,
+ ready = readyList;
// Reset the list of functions
readyList = null;
- }
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ while ( (fn = ready[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).unbind( "ready" );
+ }
}
}
},