Jquery 引导折叠:打开一个,隐藏另一个

Jquery 引导折叠:打开一个,隐藏另一个,jquery,html,css,twitter-bootstrap,collapse,Jquery,Html,Css,Twitter Bootstrap,Collapse,我有两个按钮 <a class="btn btn-primary btn-sm" data-toggle="collapse" id="collapseSpecificationsButton" href="#collapseSpecifications" role="button" aria-expanded="false" aria-controls="collapseSpecifications">+Spezifikationen</a>\r\n 当我按下按钮时

我有两个按钮

<a class="btn btn-primary btn-sm" data-toggle="collapse" id="collapseSpecificationsButton" href="#collapseSpecifications" role="button" aria-expanded="false" aria-controls="collapseSpecifications">+Spezifikationen</a>\r\n 
当我按下按钮时什么也没发生,有人能帮我吗?
如何调试此内容?

如果要切换内容:

$(document).ready(function($) {
     $("#collapseSpecificationsButton").on("click", function() {
         $("#collapseTimes").toggle();
      });
 });
如果您只是想隐藏它:

$("#collapseTimes").hide();

你能看看你的Javascript控制台吗?有什么错误吗?不要在头里面写$(文档)。准备好了。因为您的div尚未定义,所以它不会看到您的div。你应该试着写下我知道这已经得到了回答,但也要检查引导文档中的“手风琴”。如果我对你的问题理解正确,那么更好的方法是:
$("#collapseTimes").hide();