Skip to content

Instantly share code, notes, and snippets.

@alexdev27
Last active January 31, 2017 05:20
Show Gist options
  • Select an option

  • Save alexdev27/0b252553ca1239d2c89d9dbf56b3aa1a to your computer and use it in GitHub Desktop.

Select an option

Save alexdev27/0b252553ca1239d2c89d9dbf56b3aa1a to your computer and use it in GitHub Desktop.

Revisions

  1. alexdev27 revised this gist Jan 31, 2017. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion module.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    var mymodule = (function () {

    //// переменные ////



    //// ----------////

    // Функция инициализации
    var launchInit = function () {
    _initVars(); // запуск инициализации переменных
    @@ -8,7 +14,7 @@ var mymodule = (function () {
    };

    var _initVars = function () {
    // тут создаем и инициализируем переменные
    // тут инициализируем переменные

    };

  2. alexdev27 revised this gist Jan 31, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions module.js
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@ var mymodule = (function () {

    // Функция инициализации
    var launchInit = function () {
    _initVars(); // запуск инициализации переменных
    _launchListeners();// запуск прослушки событий

    };
  3. alexdev27 revised this gist Jan 31, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions module.js
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,8 @@ var mymodule = (function () {

    };

    // другие функции располагаются здесь, до return

    return {
    init: launchInit
    };
  4. alexdev27 revised this gist Jan 31, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions module.js
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,11 @@ var mymodule = (function () {

    };

    var _initVars = function () {
    // тут создаем и инициализируем переменные

    };

    var _launchListeners = function () {
    // тут пишем код для прослушки событий

  5. alexdev27 created this gist Jan 31, 2017.
    19 changes: 19 additions & 0 deletions module.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    var mymodule = (function () {

    // Функция инициализации
    var launchInit = function () {
    _launchListeners();// запуск прослушки событий

    };

    var _launchListeners = function () {
    // тут пишем код для прослушки событий

    };

    return {
    init: launchInit
    };
    })();

    mymodule.init();