JSFiddle - React, Tailwind, and code Playground
by Taleeb Anwar
HTML
<div id='c_response'>
<input type='text' required />
<input type='text' required />
</div>
<button id='c_input_submit' >submit</button>
JavaScript
jQuery('#c_input_submit').click(function (e) {
e.preventDefault();
jQuery("#c_input_submit").attr('disabled', 'disabled');
jQuery("#c_response").empty().append('Error');
jQuery("#c_response")
.css({
"color": "#ffffff",
"background": "red"
})
.show(2000)
.delay(2500)
.hide(2000)
.delay(1000,function () {
jQuery("#c_input_submit").removeAttr('disabled');
});
});