Pass correct “this” context to setTimeout callback?
EDIT: In summary, back in 2010 when this question was asked the most common way to solve this problem was to save a reference to the context where the setTimeout function call is made, because setTimeout executes the function with this pointing to the global object: var that = this; if (this.options.destroyOnHide) { setTimeout(function(){ that.tip.destroy() … Read more