bootstrap手风琴不能正常工作

时间:2014-03-05 13:27:42

标签: css3 twitter-bootstrap

我的bootstrap 2.3手风琴无法正常工作 它只适用于一次点击标签,它不起作用 这是我的代码: 这是我想放置手风琴的链接 http://etekstudio.org/demo/crateen/test-featured

<div class="accordion" id="accordion2">
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
        Collapsible Group Item #1
      </a>
    </div>
    <div id="collapseOne" class="accordion-body collapse in">
      <div class="accordion-inner">
        Anim pariatur cliche...
      </div>
    </div>
  </div>
  <div class="accordion-group">
    <div class="accordion-heading">
      <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
        Collapsible Group Item #2
      </a>
    </div>
    <div id="collapseTwo" class="accordion-body collapse">
      <div class="accordion-inner">
        Anim pariatur cliche...
      </div>
    </div>
  </div>
</div>

1 个答案:

答案 0 :(得分:1)

在页面底部包含以下内容:
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script src="js/bootstrap.min.js"></script>

用以下代码替换代码:

    <div class="panel-group" id="accordion">
    <div class="panel panel-default">
    <div class="panel-heading">
    <h4 class="panel-title">
    <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
      Product description
    </a>
    </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse in">
    <div class="panel-body">
    TEST STUFF
    </div>
    </div>
    </div>
    <div class="panel panel-default">
    <div class="panel-heading">
    <h4 class="panel-title">
    <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
      Reviews
    </a>
    </h4>
    </div>
    <div id="collapseTwo" class="panel-collapse collapse">
    <div class="panel-body">
   Your Review Code Here
    </div>
    </div>
    </div>
    </div>

`