collection.size

size

Backbone.sync

collection.at

atcollection.at(index) Get a model from a collection, specified by index. Useful if your collection is sorted, and if your collection isn't sorted, at will still retrieve models in insertion order. When passed a negative index, it will retrieve the model from the back of the collection.

model.has

hasmodel.has(attribute) Returns true if the attribute is set to a non-null or non-undefined value. if (note.has("title")) { ... }

sort event

"sort" (collection, options) â when the collection has been re-sorted.

view.$

$ (jQuery)view.$(selector) If jQuery is included on the page, each view has a $ function that runs queries scoped within the view's element. If you use this scoped jQuery function, you don't have to use model ids as part of your query to pull out specific elements in a list, and can rely much more on HTML class attributes. It's equivalent to running: view.$el.find(selector) ui.Chapter = Backbone.View.extend({ serialize : function() { return { title: this.$(".title").text(),

view.undelegateEvents

undelegateEventsundelegateEvents() Removes all of the view's delegated events. Useful if you want to disable or remove a view from the DOM temporarily.

collection.findWhere

findWherecollection.findWhere(attributes) Just like where, but directly returns only the first model in the collection that matches the passed attributes.

collection.indexBy

indexBy

Backbone.listenToOnce

listenToOnceobject.listenToOnce(other, event, callback) Just like listenTo, but causes the bound callback to fire only once before being removed.