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"});

view.setElement

setElementview.setElement(element) If you'd like to apply a Backbone view to a different DOM element, use setElement, which will also create the cached $el reference and move the view's delegated events from the old element to the new one.

route:[name] event

"route:[name]" (params) â Fired by the router when a specific route is matched.

collection.min

min

Backbone.off

offobject.off([event], [callback], [context])Alias: unbind Remove a previously-bound callback function from an object. If no context is specified, all of the versions of the callback with different contexts will be removed. If no callback is specified, all callbacks for the event will be removed. If no event is specified, callbacks for all events will be removed. // Removes just the `onChange` callback. object.off("change", onChange); // Removes all "change" callbacks. object.off("change")

collection.where

wherecollection.where(attributes) Return an array of all the models in a collection that match the passed attributes. Useful for simple cases of filter. var friends = new Backbone.Collection([ {name: "Athos", job: "Musketeer"}, {name: "Porthos", job: "Musketeer"}, {name: "Aramis", job: "Musketeer"}, {name: "d'Artagnan", job: "Guard"}, ]); var musketeers = friends.where({job: "Musketeer"}); alert(musketeers.length);

Collection.extend

extendBackbone.Collection.extend(properties, [classProperties]) To create a Collection class of your own, extend Backbone.Collection, providing instance properties, as well as optional classProperties to be attached directly to the collection's constructor function.

model.url

urlmodel.url() Returns the relative URL where the model's resource would be located on the server. If your models are located somewhere else, override this method with the correct logic. Generates URLs of the form: "[collection.url]/[id]" by default, but you may override by specifying an explicit urlRoot if the model's collection shouldn't be taken into account. Delegates to Collection#url to generate the URL, so make sure that you have it defined, or a urlRoot property, if all models of th

model.chain

chain

collection.reduceRight

reduceRight (foldr)