0
我就遇到了這個情況就是怪異, 爲了殺殭屍的觀點我沒有骨幹視圖收盤初始化視圖(zombi視圖問題)
你可能會問,這樣的事情
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());
}
後不綁定爲什麼this.unbind和this.el解綁。 我這樣做,因爲我在模型更新後關閉我的視圖,如果我刪除this.el取消綁定POST是不止一次,(殭屍問題)
但我的問題是,關閉視圖後,下一次當它初始化它不響應的事件,如通過點擊交叉關閉視圖X
有人可以幫助嗎? 在此先感謝。
OMG itsd working,非常感謝,我在this.render()中調用了this.delegateEvents()。 – 2012-02-09 19:46:24