DoubleClickBlocker = function() { this.clicked = false; } DoubleClickBlocker.prototype.click = function() { if (this.clicked) { return false; } this.clicked = true; return true; }