My Backbone view has a event Popout which when clicked creates a new View and open that view inside a Kendo Window. What i want is when i click on button, my events inside this view gets unbind and i can use my new view inside Kendo Window. Next when i close Kendo Window, i want my events to rebind. However i am getting a error on this.
Uncaught TypeError: Object [object Object] has no method 'delegateEvents' How can i rebind my events on close function of Kendo window?
popout: function(){
this.stopListening();
//this.delegateEvents();
this.undelegateEvents();
var model = this.model;
var popOutModuleView = new PopOutModuleView({model:model});
lightRegion.show(popOutModuleView);
Backbone.trigger("popout");
event.preventDefault();
var a = $('#lightbox').kendoWindow({
actions: ["Maximize", "Close"],
title: name,
width: "90%",
height: "90%",
resizable: true,
close: function(e){
popOutModuleView.remove();
lightRegion.close();
this.delegateEvents();
}
});