I ran into this situation that is weird,
in order to kill the zombie view i did something like this
remove: function() {
if (this.onClose){
this.onClose();
}
this.unbind();
$(this.el).unbind();
$(this.el).empty();
},
onClose: function() {
if(this.model)
this.model.unbind("change", this.render());
}
you might ask why both this.unbind and this.el unbind.
i did this way because i’m closing my view after model update, and if i remove this.el unbind the POST is going more than once, (zombie issue)
but my problem is, after closing the view, next time when it’s initialized it doesnt respond to the events, such as closing the view by clicking cross X
can someone plz help?
thanks in advance.
When you open the view again call this.delegateEvents();
That will rebind the event handlers for the view if needed.