There is no difference.
$
is the same as jQuery
. If you view the unminified source, you will see var $ = jQuery = ...
or something to that effect.
The jQuery
function checks the type of it's parameter, if it is a function, it treats it the same as $(document).ready(...)
Calling jQuery
without a parameter defaults to using document
. So $()
and $(document)
are identical. Try it in Firebug.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…