title: Opening tab with anchor link
body: <p>I have some typical tab content and I really need some help. I would like to achieve, that when user tries to get to a specific tab via external anchor link (<a href="http://www.url.com#content2" rel="noreferrer">http://www.url.com#content2</a>), the navigation link becomes activated and the correct tab is shown.</p>
  
  <p>Thank you for your help.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;nav class="inner-nav"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#content1"&gt;Inner nav navigation link1&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#content2"&gt;Inner nav navigation link2&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#content3"&gt;Inner nav navigation link3&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  
  &lt;section class="tab-content" id="content1"&gt;
      &lt;article&gt;
          content1 goes here
      &lt;/article&gt;
  &lt;/section&gt;
  
  &lt;section class="tab-content" id="content2"&gt;
      &lt;article&gt;
          content2 goes here
      &lt;/article&gt;
  &lt;/section&gt;
  
  &lt;section class="tab-content" id="content3"&gt;
      &lt;article&gt;
          content3 goes here
      &lt;/article&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>$(document).ready(function () {
          $(".tab-content").hide();
      $(".tab-content:first").show();
      $(".inner-nav li:first").addClass("active");
  
      $(".inner-nav a").click(function(){
          $(".inner-nav li").removeClass("active");
          $(this).parent().addClass("active");
          var currentTab = $(this).attr("href");
          $(".tab-content").hide();
          $(currentTab).show();
          return false;
      });
  });
  </code></pre>
  
  <p>I have a live example <a href="http://kajag.com/themes/book_your_travel/location.html" rel="noreferrer">here</a> 
  So, if you click on the navigation, everything works ok, but if you want to go to a specific tab kajag.com/themes/book_your_travel/location.html#sports_and_nature the correct tab does not open.</p>