Added document.ready shortcut to $().

This commit is contained in:
John Resig 2006-07-07 00:31:27 +00:00
parent 414d059941
commit e2c2a9392e

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;