Bootstrap Modal Backdrop Remaining

前端 未结 24 2085
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 08:55

I am showing a Bootstrap modal window for loading when performing AJAX calls. I broadcast a \"progress.init\" event when the loading modal should show and a \"progress.finis

24条回答
  •  无人及你
    2020-12-23 09:40

    If after modal hide, faded background is remained and does not let you click any where you can forcefully remove those by using below piece of code.

    first hide your modal div element.

    $('modalId').modal('hide');
    

    secondly remove 'modal-open' class from body and '.modal-backdrop' at the end of the page.

    $('body').removeClass('modal-open');
    $('.modal-backdrop').remove();
    

提交回复
热议问题