title: Closing accordion panels when another opens
body: <p>I'm working on an accordion panel group. They all open just fine, but I can't figure out how to get them to close upon opening another element. </p>
  
  <p>Here is what I'm working on in terms of code:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div id="trickslist"&gt;
        &lt;ul&gt;
          &lt;li&gt;
            &lt;a class="expand"&gt;
              &lt;div class="right-arrow"&gt;+&lt;/div&gt;
              &lt;div&gt;
                &lt;h2 class="tipstricks"&gt;Exploring your Motivations to Quit Tobacco&lt;/h2&gt;
              &lt;/div&gt;
            &lt;/a&gt;
            &lt;div class="detail"&gt;
  
            &lt;/div&gt;
          &lt;/li&gt;           
          &lt;li&gt;
            &lt;a class="expand"&gt;
              &lt;div class="right-arrow"&gt;+&lt;/div&gt;
              &lt;h2 class="tipstricks"&gt;Avoiding weight gain or alcohol&lt;/h2&gt;
            &lt;/a&gt;
            &lt;div class="detail"&gt;
  
            &lt;/div&gt;
          &lt;/li&gt;
          &lt;li&gt;
            &lt;a class="expand"&gt;
              &lt;div class="right-arrow"&gt;+&lt;/div&gt;
              &lt;h2 class="tipstricks"&gt;Making your plan stick: relapse prevention&lt;/h2&gt;
            &lt;/a&gt;
            &lt;div class="detail"&gt;
  
            &lt;/div&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have tried to create new ids to call in JS/JQuery code, but nothing seems to be working.</p>
  
  <pre><code>var $myGroup = $('#trickslist');
  $myGroup.on('show.bs.collapse', '.collapse', function () {
      $myGroup.find('.collapse.in').collapse('hide');
  });
  </code></pre>
  
  <p>I figure it's in my script, but I'm not 100% on what I'm doing wrong. </p>