inherit plugin with no dependencies [only for morden browsers]
modified from https://raw.github.com/dfilatov/jquery-plugins/master/src/jquery.inherit/jquery.inherit.js
if you want to support IE6-8,use the difference between this repo and the repo above.
Plugin provides "class" and inheritance implementation. It brings some syntax sugar for "class" declarations, constructors, "super" calls and static members.
Install
node: npm install inherit-js
bower: bower install inherit-js
Usage
var inherit = ;//seajs way.if you use requireJS,modify it. var MyClass = $;
Example
// base "class"var A = ; // inherited "class" from Avar B = $; var instanceOfA = 'property';var instanceOfB = 'property'; instanceOfB instanceof B;//trueinstanceOfB instanceof A;//true instanceOfB; // returns 'property of instanceB'instanceOfB; // returns 'AB'B; // returns 'staticA of staticB'