【问题标题】:HTML frame - Prevent bootstrap popup to disappear when user click bodyHTML 框架 - 防止引导弹出窗口在用户单击正文时消失
【发布时间】:2016-04-28 12:39:46
【问题描述】:

我正在使用引导模式弹出窗口来显示一条消息。当我在 html 框架内使用以下语句时,当用户单击正文中的任何位置时,模态对话框会消失。我的要求是防止此弹出窗口消失。

$('#testModel').modal({backdrop: 'static', keyboard: false});

<div class="modal fade" id="testModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body err-cnct">
                <h2><i class="demo-icon fa-lg icon-cancel"></i></h2>

                <p> <h4 class="modal-title">Connection Error!</h4>
                Connection to the Hub has been lost. <br/>Please check power and Ethernet connections. </p>
            </div>
        </div>
    </div>
</div>

谢谢。

【问题讨论】:

  • 你能告诉我实时网址,以便我检查问题所在
  • 通过测试,我没有看到同样的问题。看看这个Bootply

标签: javascript jquery html twitter-bootstrap


【解决方案1】:

请参阅文档here。像这样设置数据属性:

data-backdrop="static"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-28
    • 2018-05-24
    • 2021-03-05
    • 1970-01-01
    相关资源
    最近更新 更多