Added document.ready shortcut to $().

1.7/enhancement_8685
John Resig 2006-07-07 00:31:27 +00:00
parent 414d059941
commit e2c2a9392e
1 changed files with 4 additions and 0 deletions

4
jquery/jquery.js vendored
View 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;