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

0 comments on commit e2c2a93

Please sign in to comment.