How do I disable a button after click in limejs? I have tried using
this.disable()
but it does not work.
How do I disable a button after click in limejs? I have tried using
this.disable()
but it does not work.
You can also use goog.events.listenOnce. Identical signature to goog.events.listen and will only fire once.
Try goog.events.listen and goog.events.unlisten:
goog.events.listen(my_button, ['mousedown','touchstart'],function_triggered_onClick);
goog.events.unlisten(my_button, ['mousedown','touchstart'],function_triggered_onClick);
goog.events.unlisten will disable the button untill code reaches goog.events.listen again