// Backbone Model Ids and on click events
var AppointmentView = Backbone.View.extend({
getModel: function (e) {
//you might want to consider using data attributes instead
var modelId = $(e.currentTarget).attr('id');
var model = this.storeItems.get(modelId);
},
// http://stackoverflow.com/questions/24703561/backbone-model-ids-and-on-click-events
editPost: function(e) {
e.preventDefault();
var id = $(e.currentTarget).data("id");
var item = this.collection.get(id);
}
// http://stackoverflow.com/questions/9563663/how-to-find-the-id-of-model-corresponding-to-clicked-item
});