From e2c2a9392e14f4190148b3c8014fdccf66785b88 Mon Sep 17 00:00:00 2001 From: John Resig Date: Fri, 7 Jul 2006 00:31:27 +0000 Subject: [PATCH] Added document.ready shortcut to $(). --- jquery/jquery.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jquery/jquery.js b/jquery/jquery.js index 4ba40ff..dad8e6d 100644 --- a/jquery/jquery.js +++ b/jquery/jquery.js @@ -18,6 +18,10 @@ window.undefined = window.undefined; */ function jQuery(a,c) { + // Shortcut for document ready (because $(document).each() is silly) + if ( a && a.constructor == Function ) + return $(document).ready(a); + // Make sure t hat a selection was provided a = a || jQuery.context || document; -- 1.7.10.4