every time i see jQuery plugin as follows:
(function($) { $.fn.example = function(options) { return this.each(function() { return 'Example!'; }); } })(jQuery);
I am curious about this function:
(function($) {
It's necessary? If so, why? And if not, what are the alternatives / benefits?
Armin source share