title: how to link directly to jQuery accordion tab
body: <p>I have a wordpress theme that has a build in shortcode for creating an tabbed interface. The problem is that I can't link from an external page to a specific tab. I saw that there are multiple questions about the same issue, but no answer worked for me. I have to mention that my javascript / jQuery skills are close to zero so even if this might seem simple, I have no idea what to do. </p>
  
  <p>I found the jQuery code responsible for the accordion tabs in a file in my theme, here it is: </p>
  
  <pre><code>// ---------------------------------------
  // TAB
  // ---------------------------------------
  function base_tab() {
  $('.tabs-wrap').each(function(){
      var tab_group = $('.tabs-wrap');
      $('.tabs li', tab_group).click(function(e){
          e.preventDefault();
          $('.tabs a', tab_group).removeClass('current');
          $('a', this).addClass('current');
  
          $('.panes .pane', tab_group).hide();
          $('.panes .pane', tab_group).eq($(this).index()).show();
      });
  
      // Trigger Initial Tab
      var initial_tab = parseInt( $('.tabs', this).attr('initial-tab') );
      $('.tabs li', tab_group).eq(initial_tab).trigger('click');
  });
  }
  </code></pre>
  
  <p>As far as I understood from previous, similar questions I need to add this code but I can't figure out on my own where and how to make it work: </p>
  
  <pre><code>$(window.location.hash).click();
  </code></pre>
  
  <p>All the links to the tabs are currently like this: <a href="http://www.websitename.com/page/#" rel="nofollow">http://www.websitename.com/page/#</a> </p>
  
  <p>I'll appreciate any help, thanks! </p>