From: jeresig Date: Fri, 22 Oct 2010 04:08:34 +0000 (-0400) Subject: Make sure that the ready event doesn't double-fire when .bind(ready) is used. Fixes... X-Git-Tag: 1.4.4rc1~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3df41db0369cfaf0fc229c633eb87f222ad49357;p=jquery.git Make sure that the ready event doesn't double-fire when .bind(ready) is used. Fixes #7247. --- diff --git a/src/core.js b/src/core.js index 99521d91c..3a37c4a89 100644 --- a/src/core.js +++ b/src/core.js @@ -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" ); } } },