$("#mydiv").addClass("disabledbutton"); .disabledbutton { pointer-events: none; opacity: 0.4; }

disable whole div bootstrap 4