Skip to content

Instantly share code, notes, and snippets.

@camwest
camwest / Stately ViewState support for Backbone.js Views
Created October 23, 2010 21:58
A simple implementation of view states for Backbone.js
// (c) 2010 Cameron Westland, Big Bang Technology Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://bigbangtechnology.github.com/stately
/**
Example:
var MyView = Backbone.View.extend(Stately).extend({
states: {
EDITING: "editing",