Created
May 6, 2011 20:46
-
-
Save jasonporritt/959750 to your computer and use it in GitHub Desktop.
CoffeeScript declaration of Backbone.View subclass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class window.TodoView extends Backbone.View | |
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
From http://spin.atomicobject.com/2011/05/06/using-backbone-js-with-coffeescript/