Bootstrap Function Declaration

This question already has an answer here:

  • JavaScript plus sign in front of function name 3 answers

  • That is so that the function declaration is a function expression, so that it can be executed immediately.

    Usually that is done by putting parentheses around it:

    (function ($) { "use strict";
    //...
    }(window.jQuery));
    

    or:

    (function ($) { "use strict";
    //...
    })(window.jQuery);
    
    链接地址: http://www.djcxy.com/p/94928.html

    上一篇: 为什么Bootstrap函数以+符号开头?

    下一篇: 引导函数声明