git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
414d059
)
Added document.ready shortcut to $().
author
John Resig
<jeresig@gmail.com>
Fri, 7 Jul 2006 00:31:27 +0000
(
00:31
+0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 7 Jul 2006 00:31:27 +0000
(
00:31
+0000)
jquery/jquery.js
patch
|
blob
|
history
diff --git
a/jquery/jquery.js
b/jquery/jquery.js
index
4ba40ff
..
dad8e6d
100644
(file)
--- a/
jquery/jquery.js
+++ b/
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;