Let's first look at the contents of the first parenthesis: function ($) {...}, is this an anonymous function? But its formal parameter is more strange, is $, here is mainly to do not conflict with other libraries.
This makes it easier to understand that the first parenthesis is defined as an anonymous function, and we call the function with parentheses and arguments behind the function name, but because the operator's precedence we define the anonymous function to be enclosed.
Now I think we have a good idea of what this sentence means. The first parenthesis indicates that an anonymous function is defined, and then the second function represents the argument passed by the function, and the entire combination means that an anonymous function is defined and then called, and the function's argument is jquery.
Equivalent: function Fun ($) {...}; Fun (jQuery);
This method is mostly used for the development of plug-ins, when executing the code, the DOM object does not necessarily load complete.
The opposite is $ (function () {}), which is used when the DOM object of the page is loaded.
In fact, the full write of this method is: $ (document). Ready (function () {});
(function ($) {...}) (JQuery) a JS plugin notation