JSFiddle - React, Tailwind, and code Playground
JavaScript
$.fn.timedDisable = function(time) {
if (time == null) { time = 750; }
return $(this).each(function() {
$(this).addClass('blocked');
var disabledElem = $(this);
setTimeout(function() {
disabledElem.removeClass('blocked');
}, time);
});
};
$("#control_forward_bttn").click(function () {
if ($(this).hasClass('blocked')){return}
$(this).timedDisable();
window.next();
});