Last active
January 31, 2017 05:20
-
-
Save alexdev27/0b252553ca1239d2c89d9dbf56b3aa1a to your computer and use it in GitHub Desktop.
шаблон модуля из урока loftblog/loftschool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mymodule = (function () { | |
//// переменные //// | |
//// ----------//// | |
// Функция инициализации | |
var launchInit = function () { | |
_initVars(); // запуск инициализации переменных | |
_launchListeners();// запуск прослушки событий | |
}; | |
var _initVars = function () { | |
// тут инициализируем переменные | |
}; | |
var _launchListeners = function () { | |
// тут пишем код для прослушки событий | |
}; | |
// другие функции располагаются здесь, до return | |
return { | |
init: launchInit | |
}; | |
})(); | |
mymodule.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment