JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="Button 1" />
<input type="button" value="Button 2" />
<input type="button" value="Button 3" />
JavaScript
$(function() {
var $document = $(document);
$('input').click(function() {
var $button = $(this);
$document.queue(function() {
$button.attr('disabled', 'disabled');
setTimeout(function() {
$button.removeAttr('disabled');
$document.dequeue();
}, 2000);
});
});
});