I can’t find out how to delay an event handler for a widget.
I bind the event like this:
enable: function () {
this.options.isEnabled = true;
this.element.bind("keyup", $.proxy(this, "_populateList"));
},
I want to call “_populateList” with a delay. but my attempts with setTimeout are not working.
The “_populateList”:
_populateList: function (event) {
var that = this;
// do my stuffs
}
Thanks
Try this: