Created
October 8, 2012 20:27
-
-
Save bmaland/3854769 to your computer and use it in GitHub Desktop.
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
var CdView = Backbone.View.extend({ | |
tagName: "li", | |
initialize: function() { | |
this.model.on("change" this.render); | |
}, | |
events: { | |
"click .icon": "open", | |
"click .button.delete": "destroy" | |
}, | |
render: function() { | |
this.$el.html("<img src='" + this.model.get("imageUrl") + "' />"); | |
return this; | |
}, | |
open: function() { | |
// open a detailed view | |
}, | |
destroy: function() { | |
// destroy the cd | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment