jQuery show.bs.modal将不会触发

时间:2019-03-29 11:47:23

标签: jquery twitter-bootstrap

当我单击EDit图标时,此代码用于{{1}中的当前record Database。它显示了一个模型。

fa fa-pencil

这是模态

<a data-toggle="modal" data-target=".Edit-modal" class="Edit disciplinaryActionReview" style="cursor:pointer;cursor:hand;">
<span class="fa fa-pencil-square-o">
</span></a>

,但是<div class="modal Edit-modal" id="myModel"> <div class="modal-dialog" style="width: 1200px"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Edit Items Information</h4> </div> <div class="modal-body"> <div class="row"> <div class="col-md-3"> <div class="form-group"> <input type="hidden" id="EditHiddenID"> <label for="EditIdentification">Title</label> <input type="text" class="form-control" name="Edittitle" id="Edittitle"> </div> </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default mright" data-dismiss="modal">Close</button> <button type="button" class="btn btn-success" id="saveChanges">Save changes</button> </div> </div> <!-- /.modal-content --> </div> <!-- /.modal-dialog --> 未显示Modal

alert

代码:

$("#myModel").on("shown.bs.modal", function () {
      alert("hi");
    });
$("#myModel").on("shown.bs.modal", function() {
  alert("hi");
});

0 个答案:

没有答案