我想在按钮点击时打开bootstrap模式。它在Windows浏览器(IE,Edge,Chrome,FireBox)中打开很好,但它不会在iOS-Safari浏览器中打开。我看到许多开发人员遇到了同样的问题,但到目前为止我还没有得到任何确定的解决方案。
以下是我的代码。
HTML:
<!-- Modal -->
<div class="modal fade" id="loaderModal" tabindex="-1" role="dialog" aria-labelledby="loaderModalTitle">
<div class="modal-dialog modal-dialog-centered" style="position: absolute;top: 40%;left: 50%;transform: translate(-50%, -50%) !important;" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="row">
<div id="loaderDiv" class="col-md-2 col-md-offset-5 col-sm-2 col-sm-offset-5 col-xs-2 col-xs-offset-5">
<span class="fa-stack fa-3x">
<i class="fa fa-spin fa-refresh fa-stack-1x fa-inverse" style="font-size:60px; color:#0095fe;"></i>
</span>
</div>
</div>
<div class="row">
<div class="text-center" id="divSpinnertext"></div>
</div>
</div>
</div>
</div>
</div>
jQuery的:
var form = $("#createCustomerForm").steps({
labels: {
cancel: "CANCEL",
finish: "FINISH",
next: "NEXT",
previous: "PREVIOUS"
},
onFinished: function (event, currentIndex) {
$("#loaderModal").modal({ backdrop: 'static', keyboard: false })
form.submit();
}
});