Bootstrap modal appearing under background

前端 未结 30 1351
离开以前
离开以前 2020-11-22 17:09

I have used the code for my modal straight from the Bootstrap example, and have included only the bootstrap.js (and not bootstrap-modal.js). However, my modal is appearing u

30条回答
  •  一向
    一向 (楼主)
    2020-11-22 17:32

    This would cover all modals without messing up any of the animations or expected behavior..

    $(document).on('show.bs.modal', '.modal', function () {
      $(this).appendTo('body');
    });
    

提交回复
热议问题