when a modal opens need to greyout a button for few secoonds html code example
Example: jquery disable button
$('.class').prop("disabled", true);
$('#id').prop("disabled", true);
// As function
const disable = (id) => $(`#${id}`).prop("disabled", true);