title: Linking to a section of an Accordion contained within a tab?
body: <p>I am a relatively new web developer, as such, I have encountered my first major headache. Right, I'm attempting to access content within an accordion through anchor tags, the accordion is however, located within a set of tabs. the anchor tags are located within the footer of my index.php. All of this functionality has been conveniently provided by Bootstrap 3. </p>
  
  <p><a href="https://i.stack.imgur.com/wl4YI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wl4YI.jpg" alt="enter image description here"></a></p>
  
  <p>Essentially as far as I have gotten with this problem, and using stackoverfloooow I have solved the link to tab part of the problem, I did this using this script.</p>
  
  <pre><code>$(window).load(function() { 
  
      // cache the id
      var navbox = $('.nav-tabs');
  
      // activate tab on click
      navbox.on('click', 'a', function (e) {
        var $this = $(this);
        // prevent the Default behavior
        e.preventDefault();
        // send the hash to the address bar
        window.location.hash = $this.attr('href');
        // activate the clicked tab
        $this.tab('show');
      });
  
      // will show tab based on hash
      function refreshHash() {
        navbox.find('a[href="'+window.location.hash+'"]').tab('show');
      }
  
      // show tab if hash changes in address bar
      $(window).bind('hashchange', refreshHash);
  
      // read has from address bar and show it
      if(window.location.hash) {
        // show tab on load
        refreshHash();
      }
  </code></pre>