Backbone.js View can't unbind events properly

前端 未结 5 1944
执笔经年
执笔经年 2020-12-25 08:11

I have some Backbone.js code that bind a click event to a button, and I want to unbind it after clicked, the code sample as below:

var AppView = Backbone.Vie         


        
5条回答
  •  清酒与你
    2020-12-25 09:09

    There is an even easier way, assuming you want to undelegate all events:

    this.undelegateEvents();
    

提交回复
热议问题