I have a backbone view that looks like this:
var myView = Backbone.view.extend({
events: {'click .myClass': 'myFunction'},
initialze: //initialize function,
render: //render function,
myFunction: function (e) {
//do something
}
});
I want to make myFunction
work only one time, then stop being called. I believe I could use the backbone once() method to achieve this but can't figure it out. Is this the best way and how do I structure it? Thanks!