title: Close all bootstrap accordions
body: <p>I want to save my accordions as an image with HTML2CANVAS. For this i open up all accordions and everything's nice, but then they won't close later on. I digged around and found this great code:</p>
  
  <pre><code>function openAccordions(){
      $('.panel-collapse:not(".in")')
      .collapse('show'); 
  }
  
  function closeAccordions(){
      $('.panel-collapse.in')
      .collapse('hide'); 
  }
  </code></pre>
  
  <p>By the looks of it and googling around this should work, although the function openAccordions() work but closeAccordions() does not (elements stay collapsed).</p>
  
  <p>Any ideas how to work around or why this particular code might not work?</p>