I have been trying to learn how to add testing to existing code -- currently reading reading Working Effectively With Legacy Code. I have been trying to apply some of the princ
There are no class in javascript, only objects.
But if you insist on emulating the class based object-oriented model you can use this:
function ChildClass() { ParentClass.call(this); // Write the rest of your constructor function after this point. }; ChildClass.prototype = jQuery.extend({}, ParentClass.prototype, ChildClass.prototype);
jQuery.extend is a 'shallow copy' function from the jQuery library. You can replace it with any other object copying/cloning function.