Is there a way to change the backdrop of an open modal to 'static' using jQuery or JavaScript? I want to prevent the user from closing the modal by clicking outside after they have clicked the 'Submit' button on the modal. I've tried implementing the following solutions, but none seem to be working for me. Any suggestions would be greatly appreciated!
$('.modal').attr('data-bs-backdrop','static');
$('#myModal').data('bs.modal');
$('.modal').attr('data-bs-backdrop="static"');
$("#myModal").modal({'data-bs-backdrop': "static"});