JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://documentcloud.github.com/underscore/underscore.js"></script>
<script src="https://raw.github.com/documentcloud/backbone/master/backbone.js"></script>
JavaScript
var Inventory = Backbone.Model.extend({},
//STATIC
{
count: 0,
foo: function() {
alert('bar ' + this.count++);
}
});
var i = new Inventory({});
i.constructor.foo(); //This works!
var ExtendedInventory = Inventory.extend({});
var ei = new ExtendedInventory({});
ei.constructor.foo(); //THIS DOES NOT WORK