Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Created September 25, 2012 04:59
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 mushfiq/3780085 to your computer and use it in GitHub Desktop.
Save mushfiq/3780085 to your computer and use it in GitHub Desktop.
Javascript pattern
app = {};
app.run = function run() {
//console.log('Running app...');
app.init();
}
app.init = function () {
//console.log('Running init...');
app.bind();
}
app.bind = function () {
app.bindSillyMethod();
}
app.bindSillyMethod = function (){
console.log("this is a Silly method!")
}
$(document).ready(function () {
app.run();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment