public
Last active

Example of a class-style javascript object (using jquery extend())

  • Download Gist
classy-javascript.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(function(ns){
 
var Application = function Application(options) {
this.initialize(options);
}
 
$.extend(Application.prototype, {
initialize: function(options) {
console.log('Application::initialize()', options);
}
 
})
 
ns.Application = Application;
 
}(lib||(lib={})));
var lib;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.