Skip to content
Permalink
Browse files
Added document.ready shortcut to $().
  • Loading branch information
jeresig committed Jul 7, 2006
1 parent 414d059 commit e2c2a93
Showing 1 changed file with 4 additions and 0 deletions.
@@ -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;

0 comments on commit e2c2a93

Please sign in to comment.