简体   繁体   English

面板不向后切换-引导程序

[英]Panel not toggling back - Bootstrap

I just spent 5 hours trying to find the issue and I can't. 我只花了5个小时试图找到问题,但没有找到。 When I click on the h5 link, it expands as expected showing the < ul > with its < li > items, BUT when I click it again, it doesn't collapse back. 当我单击h5链接时,它会按预期扩展,显示<ul>及其<li>项,但是再次单击时,它不会退回。 I tested it in Safari, Firefox and Chrome, same issue/no difference. 我在Safari,Firefox和Chrome中对其进行了测试,相同/没有区别。 I checked the code over and over again and I don't see an issue. 我一遍又一遍地检查代码,但没有发现问题。 I found some jquery fixes on StackOverflow and still the issue remained. 我在StackOverflow上找到了一些jQuery修复程序,但问题仍然存在。 I don't know what else to try here. 我不知道还有什么可以尝试的。 Any body has any ideas what could possibly be wrong? 任何机构都有任何想法可能会出错吗?

I am using: https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js and http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js 我正在使用: https : //ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.jshttp://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap。 min.js

Also, all non-bootstrap classes are purely visual (color,background,gradiants, fonts). 而且,所有非引导类都是纯可视的(颜色,背景,渐变,字体)。

<div class="footer-content container text-center">
    <div class="row hideMe2">
        <div class="panel-group" id="collapse11">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h5 class="panel-title">
                        <a data-toggle="collapse" data-parent="collapse" href="#collapse1">LEARN</a>
                    </h5>
                </div>
                <div id="collapse1" class="panel-collapse collapse">
                    <ul class="list-group">
                        <li><a href="#">Link</a></li>
                        <li><a href="#">Link1</a></li>
                        <li><a href="#">Link2</a></li>
                        <li><a href="#">Link3</a></li>
                    </ul>
                </div>
                <div class="panel-heading">
                    <h5 class="panel-title">
                        <a data-toggle="collapse" href="#collapse2">ACCOUNT</a>
                    </h5>
                </div>
                <div id="collapse2" class="panel-collapse collapse">
                    <ul class="list-group">
                        <li><a href="#">Random1</a></li>
                        <li><a href="#">Random2</a></li>
                    </ul>
                </div>
                <div class="panel-heading">
                    <h5 class="panel-title">
                        <a data-toggle="collapse" href="#collapse3">CONNECT</a>
                    </h5>
                </div>
                <div id="collapse3" class="panel-collapse collapse">
                    <ul class="list-group">
                        <li>FACEBOOK</li>
                        <li>TWITTER</li>
                    </ul>
                </div>
                <div class="panel-heading">
                    <h5 class="panel-title">
                        <a data-toggle="collapse" href="#collapse4">ANIMALS</a>
                    </h5>
                </div>
                <div id="collapse4" class="panel-collapse collapse">
                    <ul class="list-group">
                        <li><a href="#">111</a></li>
                        <li><a href="#">222</a></li>
                        <li><a href="#">333</a></li>
                        <li><a href="#">444</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

I reproduced your problem in plunker, 我用塞子重现了您的问题,

<http://plnkr.co/edit/ZerTE4CyiLefpbypPIBn>

with setup of plunker bootstrap and your example work. 安装了插件引导程序和您的示例工作。 Try to include new cdn for scripts or download and import them in the file, I think this is solution for your problem. 尝试为脚本包括新的CDN或下载并将其导入文件中,我认为这是解决您问题的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM