Skip to content

Instantly share code, notes, and snippets.

@jasonporritt
Created May 6, 2011 20:45
Show Gist options
  • Save jasonporritt/959748 to your computer and use it in GitHub Desktop.
Save jasonporritt/959748 to your computer and use it in GitHub Desktop.
Backbone class declaration
window.TodoView = Backbone.View.extend
tagName: "li"
template: _.template($('#item-template').html())
events:
"click .check" : "toggleDone",
"dblclick div.todo-content" : "edit",
"click span.todo-destroy" : "clear",
"keypress .todo-input" : "updateOnEnter"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment