在Bootstrap 3中关闭面板

Das*_*ffe 8 twitter-bootstrap

我有以下代码:

<div class="col-md-6">
    <div class="panel panel-primary copyright-wrap" id="copyright-wrap">
        <div class="panel-heading">
            Copyright Info
            <button type="button" class="close"
                    data-target="copyright-wrap"
                    data-dismiss="panel">
                <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
            </button>
        </div>
        <div class="panel-body">
            &copy; some random dude
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

但由于某种原因它只是不起作用.是panel即使dismissable?我找到了警报和模态的解决方案,但没有找到面板.另一个人说,有一个没有文档的功能(如何使用数据解除来解雇引导程序面板?)

但这也不起作用.

看看这个JSFiddle

Zat*_*ath 14

根据Relequestual的代码,您似乎错过了target参数中的#标签,并且该dismiss参数被设置为保持设置为alert.

示例:http://jsfiddle.net/y9yroaee/