title: How to make accordion not expand by default?
body: <p>How to make accordion not expand as default ?
  Expand it when a user click on it.</p>
  
  <p>Then, after it's expand, I want to switch the header from  "Show" to "Hide".</p>
  
  <p>Here is what I got so far.</p>
  
  <p><a href="http://jsfiddle.net/z2tNg/45/" rel="nofollow">FIDDLE</a></p>
  
  <p><code>HTML</code></p>
  
  <pre><code>&lt;div class="accordion" id="accordion1"&gt;
      &lt;div class="accordion-group"&gt;
          &lt;div class="accordion-heading"&gt;
  
              &lt;a class="accordion-toggle" data-toggle="collapse" href="#collapseOne"&gt;
                  Show
              &lt;/a&gt;
          &lt;/div&gt;
          &lt;div id="collapseOne" class="accordion-body collapse"&gt;
              &lt;div class="accordion-inner"&gt;
                      In software, a stack overflow occurs when the stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-threading, and amount of available memory. When a program attempts to use more space than is available on the call stack (that is, when it attempts to access memory beyond the call stack's bounds, which is essentially a buffer overflow), the stack is said to overflow, typically resulting in a program crash.
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><code>JS</code></p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
  
              $(function(){
      $(window).resize(function() {    // Optional: if you want to detect when the window is resized;
          processBodies($(window).width());
      });
      function processBodies(width) {
          if(width &gt; 768) {
              $('.accordion-body').collapse('show');
          }
          else {
              $('.accordion-body').collapse('hide');
          }
      }
      processBodies($(window).width());
  });
  
  
  
  
      &lt;/script&gt;
  </code></pre>