There are no differences, and the documents show no difference:
All three of the following syntaxes are equivalent:
- $ (document) .ready (handler)
- $ (). ready (handler) (this is not recommended)
- $ (handler)
Straight from: http://api.jquery.com/ready/
I think you are confused by an example showing jQuery(function($){ ... }); This is just a way to call $(handler) , without the $ conflict.
IE
// Here `$` is used by another library jQuery(function($){ // Here `$` refers to jQuery });
source share