title: Open close buttons function bootstrap
body: <p>I am using bootstrap collapse to hide and show content on page and I would like to change it a bit. Here is example from <a href="http://www.bootply.com/FgzrmDQurW" rel="nofollow">Bootply</a>. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
  
  &lt;div class="container"&gt;
    &lt;div class="row"&gt;
      &lt;div class="col-md-6 col-lg-6"&gt;
        &lt;button type="button" class="btn btn-info" data-toggle="collapse" data-target="#first"&gt;FIRST&lt;/button&gt;
        &lt;div id="first" class="collapse"&gt;
          Lorem ipsum dolor sit amet, consectetur adipisicing elit,
          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
          quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        &lt;/div&gt;
      &lt;/div&gt; 
      &lt;div class="col-md-6 col-lg-6"&gt;
        &lt;button type="button" class="btn btn-info" data-toggle="collapse" data-target="#second"&gt;SECOND&lt;/button&gt;
        &lt;div id="second" class="collapse"&gt;
          Lorem ipsum dolor sit amet, consectetur adipisicing elit,
          sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
          quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        &lt;/div&gt;
      &lt;/div&gt; 
    &lt;/div&gt; 
  &lt;/div&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Let's say that first one is OPEN and second is CLOSED. When I click on second and it opens I would like for first one to CLOSE (and other way around). </p>
  
  <p>Is it possible to do this with javascript/jquery? I am still learning javascript/jquery and have little knowledge, so any help would be appreciated.</p>