Javascript 带确认模式的引导表问题

Javascript 带确认模式的引导表问题,javascript,twitter-bootstrap,Javascript,Twitter Bootstrap,我很难为使用bootstrap table(bootstrap v3.3)创建的表的delete事件实现确认模式 这是表格的工具栏(注意删除按钮的模态规范) 我在视图中添加了以下内容 </div> <!--Confirmation Modal--> <div class="modal fade" id="confirmModal" tabindex="-1" role="dialog aria-labell edby="myModalLabel" aria-hidd

我很难为使用bootstrap table(bootstrap v3.3)创建的表的delete事件实现确认模式

这是表格的工具栏(注意删除按钮的模态规范)

我在视图中添加了以下内容

</div>
<!--Confirmation Modal-->
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog aria-labell
edby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
     <div class="modal-content">
        <div class="modal-header">
        <h1>Are you sure?</h1>
        </div>
     <div class="modal-body">

     </div>
     <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cance
l</button>
        <a href="#" class="btn btn-danger danger">Delete</a>
     </div>
   </div>
  </div>
</div>

<!--Table-->
<div id="list">
  <table id="table" data-toggle="table" data-pagination="true" data-search="true
" data-show-refresh="true" data-show-columns="true" data-toolbar="#toolbar">
    <thead>
      <tr>
        <th data-field="state" data-checkbox="true"></th>
        <th data-field="phn" data-sortable="true">Personal Health #</th>
        <th data-field="name" data-sortable="true">Full Name</th>
        <th data-field="preferred_name" data-sortable="true">Preferred Name</th>
        <th data-field="sex" data-sortable="true">Sex</th>
        <th data-field="date_of_birth" data-sortable="true">Date of Birth</th> 
      </tr>
    </thead>
  </table>
</div>
$(function () {
  console.log( "Table loaded" );

  $('#table').bootstrapTable()
  .on('all.bs.table', function (e, name, args) {
    console.log('Event:', name, ', data:', args);
  }) 
   ...
   $('#delete').click(function () {
    var path = $(location).attr('pathname');
    var path = path + '/ajax';
    var token = {
      _token: $('#token').attr('value')
    };
</div>
<!--Confirmation Modal-->
<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog aria-labell
edby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
     <div class="modal-content">
        <div class="modal-header">
        <h1>Are you sure?</h1>
        </div>
     <div class="modal-body">

     </div>
     <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cance
l</button>
        <a href="#" class="btn btn-danger danger">Delete</a>
     </div>
   </div>
  </div>
</div>