set disabled with class code example
Example 1: disable whole div bootstrap 4
$("#mydiv").addClass("disabledbutton");
.disabledbutton {
pointer-events: none;
opacity: 0.4;
}
Example 2: style disabled button
button:disabled,
button[disabled]{
border: 1px solid #999999;
background-color: #cccccc;
color: #666666;
}