title: Send someone the URL of a hidden div
body: <p>So I hope someone can help. I'd like to send someone the url of a hidden div and have it open up for them complete with it's holding page.</p>
  
  <p>My click event is in a list item in index.html such as:</p>
  
  <pre><code>&lt;li&gt;
      &lt;a href="#" name="linkAbout" title="About" class="tablinks" 
        onclick="openScript(event,'about')"&gt;
          About
      &lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>and this gets revealed within the div with some javascript by:</p>
  
  <pre><code>&lt;div id="about" class="tabcontent"&gt; 
      &lt;script&gt;
          $( "#about" ).load( "pages/about.html", function(){
          });
      &lt;/script&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>My research suggests that I should be sending them something like: </p>
  
  <ul>
  <li><p><a href="http://www.myserver.net/index.html#linkAbout" rel="nofollow noreferrer">http://www.myserver.net/index.html#linkAbout</a> (referencing the initial click href) or,</p></li>
  <li><p><a href="http://www.myserver.net/index.html#about" rel="nofollow noreferrer">http://www.myserver.net/index.html#about</a> (referencing the hidden div)</p></li>
  </ul>
  
  <p>but neither work as they only open the parent index.html page. Any clues? I know I could send them <a href="http://myserver.net/pages/about.html" rel="nofollow noreferrer">http://myserver.net/pages/about.html</a> but that doesn't show all the styling and content etc. that's referenced from within index.html.</p>
  
  <p>My thanks for your interest.</p>
  
  <p><strong>Update - solved thanks</strong> to <a href="https://stackoverflow.com/questions/28396079/how-to-show-hidden-div-using-url">How to show hidden div using url</a> and @mplungjan</p>
  
  <p>For those interested I created div id's for the clickable links then put the following in my head statements:</p>
  
  <pre><code>    $(document).ready(function(){
          // Binding click events to elements
          // Usage send a url to someone in the form http://myserver.net/#linkBenefits to open that specific page.
  // Otherwise it will open http://myserver.net/#linkHome.
  
      var locationHash = window.location.hash.substring(1);
      if (locationHash == 'linkBenefits'){
        $('#linkBenefits').trigger('click'),openScript(event,'benefits');
      }  else {
          $('#linkHome').trigger('click'),openScript(event,'home');
      }
  });
  </code></pre>
  
  <p>Thanks @mplungjan and others for their interest.</p>