View.extend

extendBackbone.View.extend(properties, [classProperties]) Get started with views by creating a custom view class. You'll want to override the render function, specify your declarative events, and perhaps the tagName, className, or id of the View's root element. var DocumentRow = Backbone.View.extend({ tagName: "li", className: "document-row", events: { "click .icon": "open", "click .button.edit": "openEditDialog", "click .button.delete": "destroy" }, ini

router.execute

executerouter.execute(callback, args, name) This method is called internally within the router, whenever a route matches and its corresponding callback is about to be executed. Return false from execute to cancel the current transition. Override it to perform custom parsing or wrapping of your routes, for example, to parse query strings before handing them to your route callback, like so: var Router = Backbone.Router.extend({ execute: function(callback, args, name) { if (!loggedIn) {

router.route

routerouter.route(route, name, [callback]) Manually create a route for the router, The route argument may be a routing string or regular expression. Each matching capture from the route or regular expression will be passed as an argument to the callback. The name argument will be triggered as a "route:name" event whenever the route is matched. If the callback argument is omitted router[name] will be used instead. Routes added later may override previously declared routes. initialize: functi

model.idAttribute

idAttributemodel.idAttribute A model's unique identifier is stored under the id attribute. If you're directly communicating with a backend (CouchDB, MongoDB) that uses a different unique key, you may set a Model's idAttribute to transparently map from that key to id. var Meal = Backbone.Model.extend({ idAttribute: "_id" }); var cake = new Meal({ _id: 1, name: "Cake" }); alert("Cake id: " + cake.id);

collection.reduceRight

reduceRight (foldr)

model.clone

clonemodel.clone() Returns a new instance of the model with identical attributes.

collection.find

find (detect)

model.keys

keys

Backbone.noConflict

Backbone.noConflictvar backbone = Backbone.noConflict(); Returns the Backbone object back to its original value. You can use the return value of Backbone.noConflict() to keep a local reference to Backbone. Useful for embedding Backbone on third-party websites, where you don't want to clobber the existing Backbone. var localBackbone = Backbone.noConflict(); var model = localBackbone.Model.extend(...);

collection.without

without