Skip to content

Instantly share code, notes, and snippets.

@marcelosomers
Created September 10, 2014 15:30
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 marcelosomers/7b1adffae5603b1e4bb1 to your computer and use it in GitHub Desktop.
Save marcelosomers/7b1adffae5603b1e4bb1 to your computer and use it in GitHub Desktop.
JavaScript Module Pattern
var App = App || {};
App.Section = App.Section || {};
App.Section.Script = function () {
// Initialize global functions
function initalizeDomElements() {
}
function wireEvents() {
}
function initialize() {
initalizeDomElements;
wireEvents();
}
return {
initialize: initalize
};
}();
$(document).ready(function() {
App.Section.Script.initialize();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment