do not destroy modal when clicking on outside modal-box jquery modal code example
Example 1: bootstrap modal prevent close
$('#myModal').modal({backdrop: 'static', keyboard: false})
Example 2: how to stop user from clicking outside alert box js
allowOutsideClick: false