title: Bootstrap accordion: collapse all except parent
body: <p>I have multiples accordions in the same page. Some of them inside another accordion.</p>
  
  <p>When one panel is clicked, I need to close all open panels. This is simple:</p>
  
  <pre><code>$('.panel-group').on('show.bs.collapse', function (event) {
      $('.collapse.in').collapse('hide');
  });
  </code></pre>
  
  <p>But I need to check if the panel is not parent of the clicked panel. How can I do this?</p>
  
  <p>An example of my issue: <a href="http://codepen.io/anon/pen/RRkBJw?editors=1010" rel="nofollow">http://codepen.io/anon/pen/RRkBJw?editors=1010</a></p>