model.sync

syncmodel.sync(method, model, [options]) Uses Backbone.sync to persist the state of a model to the server. Can be overridden for custom behavior.

collection.forEach

forEach (each)

model.id

idmodel.id A special property of models, the id is an arbitrary string (integer id or UUID). If you set the id in the attributes hash, it will be copied onto the model as a direct property. Models can be retrieved by id from collections, and the id is used to generate model URLs by default.

collection.push

pushcollection.push(model, [options]) Add a model at the end of a collection. Takes the same options as add.

model.previous

previousmodel.previous(attribute) During a "change" event, this method can be used to get the previous value of a changed attribute. var bill = new Backbone.Model({ name: "Bill Smith" }); bill.on("change:name", function(model, name) { alert("Changed name from " + bill.previous("name") + " to " + name); }); bill.set({name : "Bill Jones"});

collection.groupBy

groupBy

model.invert

invert

Backbone.$

Backbone.$Backbone.$ = $; If you have multiple copies of jQuery on the page, or simply want to tell Backbone to use a particular object as its DOM / Ajax library, this is the property for you. Backbone.$ = require('jquery');

model.attributes

attributesmodel.attributes The attributes property is the internal hash containing the model's state â usually (but not necessarily) a form of the JSON object representing the model data on the server. It's often a straightforward serialization of a row from the database, but it could also be client-side computed state. Please use set to update the attributes instead of modifying them directly. If you'd like to retrieve and munge a copy of the model's attributes, use _.clone(model.attrib

error event

"error" (model_or_collection, response, options) â when a model's or collection's request to the server has failed.