问题描述
我在全屏上覆盖了一个弹出窗口。现在,当我按下按钮时,我想设置一个弹出窗口。您也可以在窗口外部单击。然后弹出窗口消失。我也希望在其中设置一个cookie。不知何故我不了解整个事情。这是我的代码:
$(function() {
$("#custom-modal").modal("show");
});
/* Close the popup when the a selection is made */
$("#selectCity").on("change",function() {
$("#custom-modal").modal("hide");
});
$.modal({
// enable/disable cookies
cookie: true,// cookie name
cookieName: 'eisstadion',// enable/disable cookie session
cookieSession: true,// expire time
cookieExpires: 30,// cookie path
cookiePath: '/'
});
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- A Bootstrap Modal -->
<div id="custom-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Achtung!</h4>
</div>
<div class="modal-body">
Ab sofort nur noch Online die Tickets
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Hier gehts zum Shop</button>
</div>
</div>
</div>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)