Twitter Bootstrap / jQuery - How to temporarily prevent the modal from being closed?
I am using Twitter Bootstrap modals, with the default options where you can click the backdrop or press [Esc] to close the modal. However, when I initiate an ajax operation in the modal I want to disable the modal from being closed in any way. So I disable buttons and hide the modal's close button but I can't figure out how to disable the backdrop and the [Esc] key. I tried: $('#myModal').modal({ backdrop: 'static', keyboard: false }); But this doesn't seem to work on the fly. I will also need to re-enable the backdrop and keyboard once the ajax operation is finished. davidkonrad Note : This