If you see this:
(function($) {
})(jQuery);
This does two things:
- Defining an anonymous function using
$jQuery as a reference. - A call going through
jQuery.
You can do it as follows:
function foo($) {
}
foo(jQuery);
... but this creates an unnecessary character.
, jQuery jQuery $, jQuery.noConflict() jQuery $ , jQuery, (Prototype MooTools, ) $, - jQuery . $ , , .