Skip to content

Instantly share code, notes, and snippets.

@hugodias
Created October 5, 2012 17:19
Show Gist options
  • Save hugodias/3841119 to your computer and use it in GitHub Desktop.
Save hugodias/3841119 to your computer and use it in GitHub Desktop.
Javascript prototype boilerplate
;(function() {
var App,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
App = (function() {
// Constructor
function App() {
this.initialize();
}
App.prototype.initialize = function() {
this.events();
}
App.prototype.events = function() {
// Set your events here
}
return App;
})();
$(function() {
return App = new App();
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment