Created
September 2, 2015 03:49
-
-
Save tojibon/ec6af50f0b37f92c8257 to your computer and use it in GitHub Desktop.
Custom module for you to write your own javascript functions
This file contains 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
/** | |
Custom module for you to write your own javascript functions | |
**/ | |
var Custom = function () { | |
// private functions & variables | |
var myFunc = function(text) { | |
alert(text); | |
} | |
// public functions | |
return { | |
//main function | |
init: function () { | |
//initialize here something. | |
}, | |
//some helper function | |
doSomeStuff: function () { | |
myFunc(); | |
} | |
}; | |
}(); | |
/*** | |
Usage | |
***/ | |
//Custom.init(); | |
//Custom.doSomeStuff(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment