When a function is called, the parentheses and arguments are written after the function, and because of the precedence of the operator, the function itself also needs parentheses, namely:
(function (ARG) {...}) (param)
and (function ($) {...}) (jquery) is the same, the reason that only use $ in formal parameters is to not conflict with other libraries, so the argument with jQuery is actually equal to
var fn = function ($) {...};
FN (jQuery);
You can actually understand that, but be aware that FN doesn't exist.
That function is defined directly and then runs. It's compressed to look like this.
(function ($) {...}) (JQuery)
Simple to understand is (function ($) {...}) (jQuery) defines a number of functions that need to be pre-defined
$ (function () {}) is used to run execution of those preprint-defined functions after DOM loading is complete
JQuery (function () {}), all written as
JQuery (document). Ready (function () {});
The meaning is that the ready () method is executed after the DOM has been loaded.
(function () {}) (JQuery);
JQuery (function () {}), which holds the code for manipulating the DOM object, and the DOM object already exists when the code executes it. cannot be used to store code that develops plug-ins, because jquery objects are not passed, and external methods (functions) cannot be called by Jquery.method.
In jquery (function ($) {...}) What is (jQuery)