title: show and hide divs on click on another page
body: <ol>
  <li>List item</li>
  </ol>
  <p>I am using the following code to hide a div and show the other.</p>
  <p>page1</p>
  <pre><code>&lt;a id=&quot;show&quot; href=&quot;2#dk&quot; onclick='document();'&gt;mylink&lt;/a&gt;
  &lt;a id=&quot;show1&quot; href=&quot;2#dh&quot; onclick='document();'&gt;mylink&lt;/a&gt;   
  </code></pre>
  <p>page 2</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
  
      $(&quot;#show&quot;).click(function(){
          $(&quot;dk&quot;).show();
          $(&quot;dh&quot;).hide();
      });
      $(&quot;#show1&quot;).click(function(){
          $(&quot;dh&quot;).show();
          $(&quot;dk&quot;).hide();
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id=&quot;dk&quot;&gt;mylink&lt;/a&gt;
  &lt;div id=&quot;dh&quot;&gt;mylink&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>This works on one page but not after the anchor tag loads up another page.</p>
  <p><strong>PREMISE</strong>
  I have pages:-</p>
  <ol>
  <li>first</li>
  <li>second</li>
  </ol>
  <p>I want links on on page and divs on second page</p>
  <ol>
  <li>frist page links</li>
  <li>divs</li>
  </ol>
  <p><strong>OBJECTIVE</strong></p>
  <ol>
  <li>If the page is first page, links need to be on this page</li>
  <li>If the page is second page, then I wish to hide the divs that are not link to the link thats clicked</li>
  </ol>
  <p>you can see here what i mean even i will put account detials that ppl can look at code and try if they want
  <a href="http://testscripten.enjin.com/login" rel="nofollow noreferrer">http://testscripten.enjin.com/login</a></p>
  <ul>
  <li><p>username:testscripten</p>
  </li>
  <li><p>password:test12345</p>
  <p>go to admin and then edit
  page layout and next to text will a pencil to change html or java</p>
  </li>
  </ul>