JSFiddle - React, Tailwind, and code Playground

HTML

<input type='button'  value='click'/>
<input type='button'  value='click'/>
<input type='button'  value='click'/>
<input type='button'  value='click'/>

JavaScript

function startAjax(){
   $('input[type=button]').attr('disabled','disable');
    //do your ajax here
        alert('ajax start buttons disabled');
}

function stopAjax(){
   $('input[type=button]').removeAttr('disabled');
        alert('ajax stop buttons  enabled');
}

$.when( startAjax() )
    .then(function(){
        stopAjax();

    })
    .fail(function(){
        console.log( 'failed' );
    });