大家。 我的网站上的价目表有问题。 网址如下:
http://auto2000.waw.pl/cennik/
如果您单击“Przebieg”,则会打开服务和价格列表。当您点击它时 - 隐藏。
但是,如果您先单击“Przebieg”,然后单击“Okres oksplatacji”(或其他位置),则“Przebieg”不会隐藏。
问题可能出在哪里?我不知道。
这是左列的代码:
<div class="col-xs-12">
<a class="btn btn-cennik" role="button" data-toggle="collapse" href="#<?php the_sub_field('cennik_href'); ?>" aria-expanded="false" aria-controls="collapseExample">
<?php the_sub_field('cennik_nazwa_sekcji'); ?>
</a>
</div>
来自 boostrap.js 的代码 js 没有以任何方式处理。 我使用这个js规则 http://getbootstrap.com/javascript/#collapse
最佳答案
我创建了一个 JSfiddle 显示我评论的算法:
if (child is visible){
hide the child
} else {
hide all the others
show your child
}
但是如果您坚持使用 Bootstrap,您应该会看到 this question's最佳答案。
关于javascript - Bootstrap js崩溃不隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39464448/