Skip to content

Instantly share code, notes, and snippets.

@itokami1123dev
Last active December 20, 2015 03:49
Show Gist options
  • Save itokami1123dev/6066897 to your computer and use it in GitHub Desktop.
Save itokami1123dev/6066897 to your computer and use it in GitHub Desktop.
var SelectedItemView = Backbone.View.extend({
tagName: 'tr',
model: null, // :MenuItem
initialize: function(options){
var selectedItem = this.model;
},
createRender: function(){
var menuItem = this.model;
var name = menuItem.get("name");
var price = menuItem.get("price");
this.$el
.append($('<td>').text(name))
.append($('<td>').text(price));
return this;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment