我不知道原因,但我已将data-toggle
和data-target
正确分配到我的按钮。单击具有监听器的相应按钮后,我的模态不会显示。有什么帮助,为什么它不会显示?
@section ('content')
<div class = "row">
<div class = "col-md-12">
<table class = "table">
<thead>
<tr>
<th>Title</th>
<th>Content</th>
<th>Category</th>
<th>Approver</th>
<th>Date Sent</th>
<th>Action</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr class = "info">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<button type="submit"
class="btn btn-success glyphicon glyphicon-thumbs-up"
data-toggle="modal"
data-target="#myModal"> Approve</button>
</td>
<td></td>
</tr>
</tbody>
</table>
<div class = "modal fade" id = "myModal">
<div class = "modal-dialog">
<div class = "modal-content">
<div class = "modal-header">
<h4>Confirm Approve</h4>
</div>
<div class = "modal-body">
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
答案 0 :(得分:0)
有没有模态页脚?你是否只使用表格来布置一个特定的东西?
答案 1 :(得分:0)
尝试将此用于模态
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content text-center">
<div class="modal-header">
<h2 class="modal-title" id="myModalLabel"> - content- </h2>
</div>
<div class="modal-body">
-content-
</div>
<div class="modal-footer">
-content-
</div>
</div>
</div>
</div>