]> source.dussan.org Git - jquery.git/commitdiff
Make sure that the ready event doesn't double-fire when .bind(ready) is used. Fixes...
authorjeresig <jeresig@gmail.com>
Fri, 22 Oct 2010 04:08:34 +0000 (00:08 -0400)
committerjeresig <jeresig@gmail.com>
Fri, 22 Oct 2010 04:08:34 +0000 (00:08 -0400)
src/core.js

index 99521d91cd274065495a773823ce49cbba9a7062..3a37c4a890400e5f79ee6abe6d43151d2002224a 100644 (file)
@@ -424,8 +424,8 @@ jQuery.extend({
                        }
 
                        // Trigger any bound ready events
-                       if ( jQuery.fn.triggerHandler ) {
-                               jQuery( document ).triggerHandler( "ready" );
+                       if ( jQuery.fn.trigger ) {
+                               jQuery( document ).trigger( "ready" ).unbind( "ready" );
                        }
                }
        },