Reputation: 2223
In my layout, I written an event like in the following way. but it's not working.I don't know where I did wrong.
var ProductLayout=Marionette.Layout.extend({
template:"#archiveBodyTpl",
regions:{
productsHeaderContainer:"#archiveHeader",
productsMiddileContainer:"#archiveBody",
productsFooterContainer:"#archiveFooter"
},
events:{
"click #ppCloseBtn":"closingProductsDiv"
},
closingPlansDiv:function(){
console.log("closing event");
}
});
can anyone help me. Thanks.
Upvotes: 0
Views: 22
Reputation: 14990
in your events you reference closingProductsDiv
but you define closingPlansDiv
so change one or the other so they match i.e
events:{
"click #ppCloseBtn":"closingProductsDiv"
},
closingProductsDiv:function(){
console.log("closing event");
}
Upvotes: 1