use the modal-body content in the Bootstrap modal, modal box to be introduced through the load method. There is a button in the introduced page. The first call mode box is that the click event of the button can be triggered, but the click event of the button cannot be triggered when repeated calls
.Modal box call method, which is called in iframe,
function modalOut(id, url, title, width) {
$("-sharp" +id).modal({backdrop:"static"}).
find(".modal-body").empty().load(url) ;
$("-sharp" +id+" .subfild span").text(title);
$("-sharp" +id +" .modal-dialog").css({"width":width});
}
//
$(".del-btn").on("click",function () {
window.parent.modalOut("delModal","delModal.html","");
});
// delModal.html
$("-sharpsureBtn").on("click",function () {
$("-sharpdelModal").modal("hide")
})
you can close the modal box except for the first call, and then do not close the modal box