引导模式弹出窗口未关闭 [英] bootstrap modal popup not closing

查看:32
本文介绍了引导模式弹出窗口未关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用引导模式弹出窗口时遇到问题.调用弹出窗口没有问题,但尝试关闭它会产生奇怪的结果.不是仅仅隐藏弹出窗口和删除背景,弹出窗口被隐藏但另一个背景被添加,使屏幕几乎变黑.原始背景不会被移除.

下面是我尝试使用的 html 代码

这是我从 bootstrap 2.3 文档中得到的,应该在 bix 中工作,就像 bootstrap 中的其他所有内容一样.

我还尝试将 javascript 与 $('#popupDelete').modal('hide'); 函数一起使用,效果相同.

解决方案

确实有 javascript 与弹出窗口的关闭发生冲突.单击父容器时,有一行 javascript 会干扰所有弹出窗口,迫使它们再次打开.

I'm having trouble using a bootstrap modal popup. Calling a popup is no issue, but trying to close it yields strange results. Instead of just hiding the popup and removing the backdrop, the popup gets hidden but another backdrop gets added, turning the screen almost black. the original backdrop does not get removed.

Below is the html code I've tried to use

<div id="popupDelete" class="modal hide fade" role="dialog">
    <div class="modal-header">delete transaction line?</div>
    <div class="moda-body">
        <button id="deleteYes">yes</button>
        <button class="cancelButton" data-dismiss="modal">no</button>
    </div>
</div>

this is what I got from the bootstrap 2.3 docs and should work out of teh bix, like everything else from bootstrap.

I've also tried using javascript with the $('#popupDelete').modal('hide'); function, which had the same effect.

解决方案

There was indeed javascript conficting with the closing of the popup. There was a line of javascript messing with all popups when clicking on a parent container, forcing them open again.

这篇关于引导模式弹出窗口未关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆