jQuery simple history solution for div's 'open' or 'closed' state
<p>I have a project that I have built which uses a simple mechanism, when a set of icon links are clicked, a div layer animates into the content area - then requires the user to click a 'close' button to animate the div in the reverse, meaning setting opacity to 0 and sliding back out of view.</p>

<p>With the div 'open', there are links to external pages (labeled 'GO'). Currently I have them opening in a new tab/window. However, the client would prefer that if you visit the external page link, then click your browser back button, the div would remain in its 'open' state.</p>

<p>Does anyone know of a relatively simple way to set this up - without completely reengineering the way I have it built? Or does it require some kind of advanced plugin and a complete rework of code?</p>

<p>The jQuery that opens the divs is here:</p>

<pre><code>var triggerPanels = function(){
for(i=1; i &lt;= 9; i++){
(function(e) {
var trigger = $("#iconTrig" + i);
var panel = $("#pane" + i);
$(trigger).click(function(){
    $(panel).animate({
     right: 0, opacity: 1
      }, 500 );

    return false;
});
 })(i);
 }
};
</code></pre>

<p>The link to a working version of the page is here, and if you click the Enter button, then click on one of the icons you will see it in action. Any help is greatly appreciated. Thanks!
<a href="http://dev.seanchristiandampier.com/asia-timber/index-dev-new.html" rel="nofollow">http://dev.seanchristiandampier.com/asia-timber/index-dev-new.html</a></p>

<p>UPDATE: The client was happy to simply open the links in a new tab - so bypassing the need to use the hash for history purposes. However, all of the comments and answer here help point to a solution, and I may play around with this a bit on my own just so that I can absorb the concept, and see if I can get it working. Thanks!</p>
