title: Expand Specific Accordion from URL
body: <p>If I use the adress "www.xxxxxx.com/test.html#chgd", the second accordion should be expanding.</p>
  
  <p>I have used the source code from this website '<a href="https://stackoverflow.com/questions/22254248/bootstrap-3-expand-accordion-from-url">Bootstrap 3 expand accordion from URL</a>' but it does not work in this context.</p>
  
  <p>I do not know what is the problem based on the source code in order to expand the the second accordion based on URL?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link href="C:\Users\h\Desktop\test\bootstrap-theme.css" rel="stylesheet"/&gt;
      &lt;link href="C:\Users\h\Desktop\test\bootstrap.css" rel="stylesheet"/&gt;
  
      &lt;script src="C:\Users\h\Desktop\test\jquery-1.11.2.min.js"&gt;&lt;/script&gt;
      &lt;script src="C:\Users\h\Desktop\test\bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          var url = document.location.toString();
          if (url.match('#')) {
              $('#' + url.split('#')[1]).addClass('in');
          }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="accordion" class="accordion-group"&gt;
          &lt;div class="panel"&gt;
              &lt;h4 id="cs" class="accordion-title"&gt;&lt;a data-toggle="collapse" data-parent="#accordion" data-target="#cs_c"&gt;Child
                  Survival: Boosting Immunity and Managing Diarrhoea&lt;/a&gt;&lt;/h4&gt;
              &lt;div id="cs_c" class="accordion-collapse collapse in"&gt;
                  &lt;p&gt;...&lt;/p&gt;
              &lt;/div&gt;
  
              &lt;h4 id="chgd" class="accordion-title"&gt;&lt;a data-toggle="collapse" data-parent="#accordion" data-target="#chgd_c"&gt;Child
                  Health, Growth and Development: Preventing Mental Impairment with Iodine and Iron&lt;/a&gt;&lt;/h4&gt;
              &lt;div id="chgd_c" class="accordion-collapse collapse"&gt;
                  &lt;p&gt;...&lt;/p&gt;
              &lt;/div&gt;
  
              &lt;h4 id="wmnh" class="accordion-title"&gt;&lt;a data-toggle="collapse" data-parent="#accordion" data-target="#wmnh_c"&gt;Women’s
                  and Newborn Survival and Health: Iron Supplementation and Food Fortification&lt;/a&gt;&lt;/h4&gt;
              &lt;div id="wmnh_c" class="accordion-collapse collapse"&gt;
                  &lt;p&gt;...&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>