I have a button which opens a modal but I have prevented the modal close by clicking background or ESC key.
My button looks like this:
success :function(){ console.log("success"); $('#contact_modal').html("").delay(3000).fadeOut(450); $('body').removeClass('modal-open'); $('.modal-backdrop.show').css('opacity','0'); $('.modal-backdrop').css('z-index','-1') }