我無法讓我的模式打開。我嘗試了Bootstrap 4網站上找到的純HTML,然後使用了一些Javascript。我真的無法弄清楚我做錯了什麼。任何幫助將非常感謝!Bootstrap 4 Modal將無法打開點擊
enter code here
<
<div class="col-sm-3 col-centered boxes" id="box1">
<button type="button" class="btn btn-primary" id="box1modal" data-toggle="modal" data-target="#exampleModal">
See More
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Wedding Invites</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<img src="Wedding%20Invites.jpg">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</div>
`enter code here`<script type="text/javascript">
enter code here
$( 「#box1modal」)點擊(函數(事件){
enter code here
$( '#myModal')模態( '秀'); enter code here
)};
非常感謝。這工作!我不敢相信我花了那麼多時間去想出來! – cerawebdesign