jQuery question: what does it really mean?

后端 未结 5 1324
北海茫月
北海茫月 2020-12-01 07:03
(function($, window, undefined){
  ... jquery code... 
})(jQuery, window);

What does it really mean? Does it also mean $(document).ready()

5条回答
  •  有刺的猬
    2020-12-01 07:40

    @rsp has a great answer for this specific question.

    For general background on this pattern also see http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth.

提交回复
热议问题