onclick = function() { if (this.disabled) return; this.disabled = true; $.post().complete(() => { this.disabled = false; }); }