$(function(){ window.Todo = Backbone.Model.extend({ defaults: function() { return { done: false, order: Todos.nextOrder() }; }, // Toggle the `done` state of this todo item. toggle: function() { this.save({done: !this.get("done")}); } }); });