この回答を拡張して、同じ名前空間 (PROJECT) に属する新しいモジュールを作成する方法を知りたいです。
A.init(); -- will become --> PROJECT.A.init();
モジュール
(function( A, $, undefined ) {
A.init = function() {
console.log( "A init" );
};
}( window.A = window.A || {}, jQuery ));
(function( B, $, undefined ) {
B.init = function() {
console.log( "B init" );
};
}( window.B = window.B || {}, jQuery ));
A.init();
B.init();