gpt4 book ai didi

jquery - 引导模式不起作用。隐藏模式下的模态弹出

转载 作者:行者123 更新时间:2023-12-01 05:40:22 25 4
gpt4 key购买 nike

我需要在单击按钮时弹出一个模式。模式正在显示,但处于隐藏模式,请看下图 enter image description here

<script>
$('.searhBtn').click(function(e) {
$('#modalSeach').modal('show');
});
</script>


<div class="modal fade" id="modalSeach" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true" >

<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3> Conformation </h3>
</div>
<div class="modal-body">
<p>
Do you want to ?
</p>
</div>
<div class="modal-footer">
<button class="btn btn-danger btn-xs" type="button" data-dismiss="modal">Close</button>
<button class="btn btn-primary btn-xs" type="submit" name="permissions_submit" id="proceed"
autofocus="autofocus" >Proceed</button>
<!--id="permissions_submit"-->
</div>
</div>
</div>
</div>

最佳答案

您的代码似乎是正确的。

带有 css 和 js 链接的 HTML 和脚本:

<script type="text/javascript" async="" src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>

<button class='searhBtn'> PRESS </button>

<div class="modal fade" id="modalSeach" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true" >

<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3> Conformation </h3>
</div>
<div class="modal-body">
<p>
Do you want to ?
</p>
</div>
<div class="modal-footer">
<button class="btn btn-danger btn-xs" type="button" data-dismiss="modal">Close</button>
<button class="btn btn-primary btn-xs" type="submit" name="permissions_submit" id="proceed"
autofocus="autofocus" >Proceed</button>
<!--id="permissions_submit"-->
</div>
</div>
</div>
</div>

<script>
$('.searhBtn').click(function(e) {
$('#modalSeach').modal('show');
});
</script>

演示:http://jsfiddle.net/ddan/8fpqxp9m/

关于jquery - 引导模式不起作用。隐藏模式下的模态弹出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31107688/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com