Skip to content

Instantly share code, notes, and snippets.

@hwclass
Created January 29, 2015 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hwclass/398338a309bf1d7232f3 to your computer and use it in GitHub Desktop.
Save hwclass/398338a309bf1d7232f3 to your computer and use it in GitHub Desktop.
Sample module implementation
/*
* A module implementation to bind events and do something else independently
*/
var module = (function () {
return function (elementType, methods) {
console.log(elementType);
console.log(methods);
}
})();
/*
* That is the usage of module implemenetation
*/
module('button', {createNew : function () {} });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment