title: Make Bootstrap tab Active on the bases of URL link
body: <p>I have bootstrap tabs and i want to make tabs active on the bases of URL link.</p>
  
  <p>For example:</p>
  
  <p><strong>xyz.xxx/index#tab2</strong> should make <strong>tab2 active</strong> on page load.</p>
  
  <p>Here is my code so far</p>
  
  <pre><code>&lt;div class="tab-wrap"&gt;
    &lt;div class="parrent pull-left"&gt;
      &lt;ul class="nav nav-tabs nav-stacked"&gt;
        &lt;li class="active"&gt;&lt;a href="#tab1" data-toggle="tab" class="analistic-01"&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
        &lt;li class=""&gt;&lt;a href="#tab2" data-toggle="tab" class="analistic-02"&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
        &lt;li class=""&gt;&lt;a href="#tab3" data-toggle="tab" class="analistic-03"&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div class="tab-content"&gt;
      &lt;div class="tab-pane active in" id="tab1"&gt;
        &lt;p&gt; hello 1&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="tab-pane" id="tab2"&gt;
        &lt;p&gt; hello 2&lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div class="tab-pane" id="tab3"&gt;
        &lt;p&gt;Hello 3&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt; &lt;!--/.tab-content--&gt;
  &lt;/div&gt;&lt;!--/.tab-wrap--&gt;
  </code></pre>
  
  <p>By default it make tab1 active so there might be possibility in my case to make the second tab active by default on the basis of my URL links.</p>
  
  <p>Suppose if i put #tab2 in URL then it should make tab2 active by default on page load.</p>