I want to display modal on button click.(我想在按钮单击时显示模式。)
I've followed bootstrap documentation, but for some reason the modal isn't popping up.Here is my code:(我已经阅读了bootstrap文档,但是由于某种原因,模态没有弹出,这是我的代码:)
Modal:(模态:)
<div class="modal fade" id="commonModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
</button>
</div>
<div class="modal-body">
<p>.............</p>
</div>
<div class="modal-footer">
..........
</div>
</div>
</div>
</div>
Button:(按键:)
<button type="button" class="btn btn-secondary btn-view-details"
data-toggle="modal"> View Details</button>
Jquery:(jQuery:)
$(document).ready(function(){
$('button.btn-view-details').on('click', function () {
$('#commonModal').modal('show');
})
})
ask by Proteeti Prova translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…