Added document.ready shortcut to $().
[jquery.git] / jquery / jquery.js
index 4ba40ff..dad8e6d 100644 (file)
@@ -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;