title: if link is clicked on one page unhide/show a div on the other page?
body: <p>i have a list of users on the home page (home.php) on my site, i am trying to figure out a way that i can unhide/show a div on their profile page (profile.php) when the user clicks another users profile link from the homepage, so this div on their profile page is only shown after they click on the link from the homepage and otherwise stays hidden.</p>
  
  <p>is this possible to do, and can someone please show me how i might do this:</p>
  
  <p>this code works if i click the link and the div is on the same page as the link but it doesnt work if i click the link on the homepage and the div is on the profile page which is what i want.</p>
  
  <p>home.php</p>
  
  <pre><code>&lt;a id="myLink" href="javascript:void(0)" onclick="javascript:myLinkButtonClick();"&gt;click here&lt;/a&gt;
  
  &lt;script&gt;
  function myLinkButtonClick()
  {
      var $element = $('.nswp-frame2');
      if($element.is(':visible')){
          $element.hide();
      } else {
          $element.show();
      }
  }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>profile.php</p>
  
  <pre><code>&lt;hidden div&gt;
  </code></pre>