How to know the Id of item I clicked? my code is given below:
$(function() {
ipl.mvc.view.openings_view = ipl.mvc.vi
This is another (newer versions of backbone?) way of doing this: (I see @Sander shows the model.get method in his remarks)
var AppointmentView = Backbone.View.extend({
events: {
'click' : 'alertTitle'
},
alertTitle : function(e) {
// this.model.get('id') is what you're looking for
alert( this.model.get('title') );
}
});