jquery prototypal inheritance

I am using the following boilerplate to try something out: https://github.com/jquery-boilerplate/jquery-patterns/blob/master/patterns/jquery.prototypal-inheritance.plugin-boilerplate.js

So if "myObject" would be named "car", how do I extend the whole thing with another class then, something like a car type eg "bmw" (main class "car", subclass "bmw")

Don't I have to change "$.plugin = function( name, object )" to "$.plugin = function( name, object, extend )" and apply the subclass to it? It's a bit unfortunate that they haven't written a full example of a prototypal inheritance. Thanks a lot in advance.

链接地址: http://www.djcxy.com/p/95312.html

上一篇: 在Javascript中使用对象作为键效率低下吗?

下一篇: jquery原型继承