Twitter bootstrap modal-backdrop doesn’t disappear

Make sure you’re not replacing the container containing the actual modal window when you’re doing the AJAX request, because Bootstrap will not be able to find a reference to it when you try to close it. In your Ajax complete handler remove the modal and then replace the data.

If that doesn’t work you can always force it to go away by doing the following:

$('#your-modal-id').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();

Leave a Comment