javascript - How to understand this jquery function -


this question has answer here:

what mean?:

 (function($){    })(jquery); 

and reason use it? thanks.

you creating new scope in javascript using function (as {} not create new scope). calling function , capturing jquery outer scope , make available inside variable $


Comments