title: Bootstrap jump to link inside a collapsed panel
body: <p>So I have a bootstrap panel that nests another panel inside it (Kind of like a book layout, with sections and then chapters inside each section, both levels foldable). I am trying to provide an href to the inner panel (chapter name) but if the section is currently collapsed, the browser doesn't scroll to that point. </p>
  
  <pre><code>&lt;div class="accordian" id="accordion1"&gt;
   &lt;!-- Multiple such sections --&gt;
    &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;
        &lt;h2 class="panel-title top-heading" data-toggle="collapse" data-parent="#accordion1" href="#collapse1"&gt;
            Section 1
        &lt;/h2&gt;
      &lt;/div&gt;
      &lt;div id="collapse1" class="panel-collapse collapse in subsection"&gt;
       &lt;!-- Each section has multiple chapters --&gt;
        &lt;div class="panel-body"&gt;
          &lt;div class="panel-group" id="subaccordion1"&gt;
  
            &lt;!-- Panel for chapter 1 --&gt;
            &lt;div class="panel panel-default"&gt;
              &lt;div class="panel-heading"&gt;
                &lt;h4 class="panel-title chapter-name" data-toggle="collapse" data-parent="#subaccordion1" href="#collapse1InnerOne1"&gt;
                  &lt;!-- The above link works when the panels are all expanded but not when they are collapsed. How to get it to work all the time? --&gt;
                   Chapter 1
                &lt;/h4&gt;
              &lt;/div&gt;
              &lt;div id="collapse1InnerOne1" class="panel-collapse collapse in"&gt;
                &lt;div class="panel-body"&gt;
                  &lt;ul&gt;
                    Chapter 1 content
                  &lt;/ul&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
  
            &lt;!-- Panel for chapter 2 --&gt;
            &lt;div class="panel panel-default"&gt;
              &lt;div class="panel-heading"&gt;
                &lt;h4 class="panel-title chapter-name" data-toggle="collapse" data-parent="#subaccordion1" href="#collapse1InnerOne2"&gt;
                   Chapter 2
                &lt;/h4&gt;
              &lt;/div&gt;
              &lt;div id="collapse1InnerOne2" class="panel-collapse collapse in"&gt;
                &lt;div class="panel-body"&gt;
                  &lt;ul&gt;
                    Chapter 2 content
                  &lt;/ul&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;!-- Panel for section 2 with chap 2&amp;3 etc --&gt;
  </code></pre>
  
  <p></p>
  
  <p><code>#collapse1InnerOne1</code> link works when the panels are open but not when they are collapsed. How to get it to work in both cases?
  Thanks.</p>