title: Accordion not working bootstrap
body: <p>I am trying to use bootstrap collapse to create an accordion on a site i am building. I can get each panel to collapse but can't get it to work like an accordion (collapse any other open panels). I have searched on here and found a few posts that suggested adding .panel .panel-group .accordion-group classes. I have done this but still can't get it to work. I suspect it may be something to do with how my divs are laid out but was wondering if any one could help?</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-10 col-md-offset-1"&gt;
          &lt;div class="accordian-group panel-group" id="accordion"&gt;
              &lt;div class="credit-box text-center panel"&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;div class="credit-title"&gt;
                               &lt;h2&gt;&lt;span class="title-bold"&gt;Bronze&lt;/span&gt; | £48.50 (2 Credits)&lt;/h2&gt;
  
                          &lt;/div&gt;
                          &lt;div class="credit-summary"&gt;
                              &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non porta purus, vel scelerisque metus. Phasellus tincidunt purus dignissim, mollis massa in, cursus nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="credit-more  collapse" id="credit-bronze"&gt;
                              &lt;p&gt;Maecenas a dictum quam, eget faucibus ex. Donec quis elementum sapien. Nulla mollis finibus velit, et auctor lacus iaculis at. Suspendisse potenti. In viverra nisi tortor.&lt;/p&gt;
                              &lt;p&gt;Ut tincidunt odio quis nulla rutrum ullamcorper ac non risus. Vestibulum id malesuada sapien, at hendrerit risus. In dignissim libero non mi facilisis condimentum.&lt;/p&gt;
                              &lt;p&gt;n tincidunt dui eget pharetra luctus. Integer eget iaculis nulla. Quisque pretium eu odio nec congue. Pellentesque tempus rutrum eros, vitae rhoncus libero commodo vel.s&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-2 col-md-offset-4"&gt;
                          &lt;div class="post-button"&gt; 
                             &lt;a data-toggle="collapse" data-parent="#accordion" href="#credit-bronze"&gt;View More&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="col-md-2"&gt;
                          &lt;div class="post-button"&gt; 
                             &lt;a href="#"&gt;Select&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="credit-box text-center panel"&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;div class="credit-title"&gt;
                               &lt;h2&gt;&lt;span class="title-bold"&gt;Silver&lt;/span&gt; | £135 (6 Credits)&lt;/h2&gt;
  
                          &lt;/div&gt;
                          &lt;div class="credit-summary"&gt;
                              &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non porta purus, vel scelerisque metus. Phasellus tincidunt purus dignissim, mollis massa in, cursus nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.&lt;/p&gt;
                          &lt;/div&gt;
                          &lt;div class="credit-more  collapse" id="credit-silver"&gt;
                              &lt;p&gt;Maecenas a dictum quam, eget faucibus ex. Donec quis elementum sapien. Nulla mollis finibus velit, et auctor lacus iaculis at. Suspendisse potenti. In viverra nisi tortor.&lt;/p&gt;
                              &lt;p&gt;Ut tincidunt odio quis nulla rutrum ullamcorper ac non risus. Vestibulum id malesuada sapien, at hendrerit risus. In dignissim libero non mi facilisis condimentum.&lt;/p&gt;
                              &lt;p&gt;n tincidunt dui eget pharetra luctus. Integer eget iaculis nulla. Quisque pretium eu odio nec congue. Pellentesque tempus rutrum eros, vitae rhoncus libero commodo vel.s&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="row"&gt;
                      &lt;div class="col-md-2 col-md-offset-4"&gt;
                          &lt;div class="post-button"&gt; 
                            &lt;a data-toggle="collapse" data-parent="#accordion" href="#credit-silver"&gt;View More&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="col-md-2"&gt;
                          &lt;div class="post-button"&gt; 
                            &lt;a href="#"&gt;Select&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>JS fiddle: <a href="https://jsfiddle.net/aybg7qwh/" rel="nofollow">https://jsfiddle.net/aybg7qwh/</a></p>