隐藏事件未触发时的Razor引导程序模态

时间:2019-07-17 15:27:24

标签: jquery twitter-bootstrap razor

使用bootstrap v 3.3.7,不会触发模式隐藏事件。 Ive在https://getbootstrap.com/docs/3.3/javascript/

处查看了文档

我尝试了以下js代码

    $(document).on('hidden.bs.modal','#editAppModal', function () {
        console.log("dddddddddddddddddddddddd");
    })
 $('#editAppModal').on('hidden.bs.modal', function (e) {
        alert("hidden...");
    })
 $(document).ready(function(){
    $('#editAppModal').on('hidden.bs.modal', function (e) {
            alert("hidden...");
        })
});

似乎没有一个工作。我正在创建我的模态

<form method="POST">
   <div class="modal" id="editAppModal" tabindex="-1" role="dialog" aria-labelledby="editAppModal" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">

      <div class="modal-header">
        <h5 class="modal-title" id="editAppModal">Edit Application</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>

      <div class="modal-body">
          <input type="text" id="appName">
          <input type="text" id="appShortName" style="width:15%">
          <hr>
            <table id="modalServerTB" style="border-collapse: separate; border-spacing: 5px 15px;">

            </table>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary" asp-page-handler="UpdateApplication">Update Application</button>
      </div>

    </div>
  </div>
</div>
</form>

我甚至禁用了淡入淡出动画。似乎什么都没用。

0 个答案:

没有答案