I have this class/function
function Menu() { this.closetimer = 0; this.dropdown = 0; } Menu.prototype.menuTimer = function() { this.closetimer = setTi
Another way is to bind the inner function.
Menu.prototype.menuTimer = function(){ this.closetimer = setTimeout(function(){ this.menuClose(); }.bind(this), this.timeout); }
Menu.prototype.menuTimer = function(){ this.closetimer = setTimeout(this.menuClose.bind(this), this.timeout); }