Created
May 24, 2016 10:39
-
-
Save daveroma/de439ed68c4c1e192b2da066eb8b2900 to your computer and use it in GitHub Desktop.
JavaScript structure for static web pages
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
var App = App || {}; | |
App.home = function() { | |
function privateFunction() { | |
return 'Can\'t see meh'; | |
} | |
return { | |
init: function() { | |
// Do it bruh | |
} | |
} | |
} | |
// init this pages JS on page load | |
$(function() { | |
var home = new App.home(); | |
home.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment