Skip to content

Instantly share code, notes, and snippets.

@tojibon
Created September 2, 2015 03:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tojibon/ec6af50f0b37f92c8257 to your computer and use it in GitHub Desktop.
Save tojibon/ec6af50f0b37f92c8257 to your computer and use it in GitHub Desktop.
Custom module for you to write your own javascript functions
/**
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