bootstrap模式对话框没有出现

时间:2015-07-21 19:23:13

标签: javascript jquery css asp.net twitter-bootstrap

我有一个应该显示的模态对话框,代码如下:

<int:filter expression="{"A", "B", "C", "D"}.contains(headers.get('someValue'))" />

代码简单无效,点击时没有任何反应,在网上查看了很多例子,它们看起来都是一样的。我有一个packages.config文件,这似乎包含bootstrap的链接。该网站的所有其他部分都认为bootstrap我会说工作正常,所以我相信链接就在那里。包文件如下所示:

# number representation from 0 to 255 (one char long)
function chr() { printf "\\$(printf '%03o' "$1")" ; return 0 ; }
# from 0 to 65535 (two char long)
function word_litleendian() { chr $(($1 / 256)) ; chr $(($1 % 256)) ; return 0 ; }
function word_bigendian() { chr $(($1 % 256)) ; chr $(($1 / 256)) ; return 0 ; }
# from 0 to 4294967295 (four char long)
function dword_litleendian() { word_lilteendian $(($1 / 65536)) ; word_litleendian $(($1 % 65536)) ; return 0 ; }
function dword_bigendian() { word_bigendian $(($1 / 65536)) ; word_bigendian $(($1 % 65536)) ; return 0 ; }

我猜我必须错过某个地方的链接,除非错误是我的代码,任何一个建议......

1 个答案:

答案 0 :(得分:0)

您的模式正在运行,但您需要删除“隐藏”#39;来自外部div的类。另外,为了获得正确的视觉效果,您需要在外部具有类&#39;模态对话框&#39;之后立即添加两个包装div。分别为“模态内容”。请在下面找到改编的代码:

<!-- start of modal dialog box -->
<div class="modal fade" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h3>Modal header</h3>
            </div>
            <div class="modal-body">
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>
                <p>
                    Ut nunc libero, sodales venenatis gravida nec, posuere quis ante.
                    Phasellus lobortis molestie felis, vitae sagittis ipsum vehicula lobortis.
                </p>
                <p>
                    Quisque lacus mi, gravida vel facilisis ac, malesuada vel augue.
                    In ac leo eget tellus aliquet aliquam. Nam faucibus urna ac justo fringilla eu
                    sollicitudin quam pretium. Proin pellentesque adipiscing sapien, non dignissim
                    massa porttitor dictum. Integer tempor aliquam arcu, eget vehicula ipsum auctor at.
                </p>
            </div>
            <div class="modal-footer" data-dismiss="modal">
                <a href="#" class="btn">Close</a>
                <a href="#" class="btn btn-green">Save changes</a>
            </div>
        </div>
    </div>
</div>
<!-- end of modal dialog box -->

为了显示你可以使用的模态:

$('#myModal').modal();
$('#myModal').modal('show');

请查看此JSFIDDLE以获取有效的演示。