$.Class provides classical inheritance simulation based on John Resig's Simple JavaScript Inheritance found at .
The class
method is available to all class instances whereas the instance
method is available only to a particular instance.
Let's write some examples in the file jquerymx_playground_0.js
:
steal( 'jquery/class', function ($) { $.Class('Bank.Account', { setup: function () { console.log('Bank.Account class: setup'); }, init: function () { console.log('Bank.Account class: init'); }, getType: function () { return 'Bank.Account class method'; } }, { setup: function () { console.log('Bank.Account instance: setup'); }, init: function () { ...