当我在chrome console中运行以下命令时
$("#inactive-selected-requests-modal").modal("show")

它不显示模态和叠加来到那里。 chrome控制台输出是:
<div class="modal fade" id="inactive-selected-requests-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" style="display: none;"></div>
答案 0 :(得分:1)
删除style="display: none;"
。它解决了我的问题。
答案 1 :(得分:0)
问题在于以下功能,我正在删除模态html而不是模态主体
$(document).on("hidden.bs.modal", "#inactive-selected-requests-modal", function () {
$("#inactive-selected-requests-modal").html("");
});
要更正我将以上功能线更改为:
$("#inactive-selected-requests-modal-body").html("");