I have the following plugin:
;(function($, window, document)
{
...
...
})(jQuery, window, document);
I can understand what the ; is for and also realize that $ is the jQuery but can someone explain why is the function followed by (jQuery, window, document);
It’s called a ‘self ivoking’ or ‘immediately invoked’ function. It means that the function is run as soon as it is created using the parameters in the final set of brackets.
Further information