I am using the same structure as explained in the answers for this question -- > How to handle nested CompositeView using Backbone.Marionette? to render my composite views and Item view. My Item view consists of LI tag. I want to handle click event for this Itemview. I am trying my code as below :which is not working The same events code snippet If I write in my first composite view, It get's triggered. But events do not get triggered in ItemView. Please help.
var topNavMenuView = Backbone.Marionette.ItemView.extend({
tagName :'li',
className:'dropdown',
template : _.template(topNavMenuItemTemplate) ,
initialize:function(options){
console.log("initialize");
this.id=options.menuCode;
},
events: {
'click li' : function(event){
alert('click');
},
'click ' : function(event){
alert('click');
}
}
});