diff --git a/src/core/ready.js b/src/core/ready.js index 3d0510e38..392c4849f 100644 --- a/src/core/ready.js +++ b/src/core/ready.js @@ -56,8 +56,9 @@ jQuery.extend({ readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); } } }); diff --git a/test/data/core/onready.html b/test/data/core/onready.html new file mode 100644 index 000000000..1e8f127e7 --- /dev/null +++ b/test/data/core/onready.html @@ -0,0 +1,24 @@ + + +
+ +