title: how to go back to a div which was active in previous page onclicking back link
body: <p>I am using a toggling of divs when clicking on links . Each div is having their own form which gets submitted to new page and there i use go back link to go to previous page . But it does not open that particular div which was active on form submitting time. Here's the code i am using</p>
  
  <pre><code>&lt;style&gt;
  .selected{
       color:red;
  }
  &lt;/style&gt;
  &lt;a href="javascript:void(0);" class="pro" target="1"&gt;
              link2 
  &lt;/a&gt;
  &lt;a href="javascript:void(0);" class="pro" target="2"&gt;
              link 1
  &lt;/a&gt;
  &lt;div  id='div1' class="itargetDiv" &gt;
     &lt;form method="post" action="a.php"&gt;
          &lt;input type="text" name="t1"&gt;
          &lt;input type="text" name="t2"&gt;&lt;br&gt;
          &lt;input type="submit" name="s1"&gt;
     &lt;/form&gt;
  &lt;/div&gt;
  &lt;div  id='div2' class="itargetDiv" style="display:none;"&gt;
       &lt;form method="post" action="a.php"&gt;
           &lt;input type="text" name="t3"&gt;
           &lt;input type="text" name="t4"&gt;
           &lt;input type="text" name="t5"&gt;
           &lt;input type="text" name="t6"&gt;&lt;br&gt;
           &lt;input type="submit" name="s2"&gt;
       &lt;/form&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.js"&gt;  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
     $(document).ready(function(){
          $(".pro").click(function(){
              $(this).addClass("selected").siblings().removeClass("selected");
              var pullNumber = $(this).attr("target");       
             $("#div"+pullNumber).show(500).siblings(".itargetDiv").hide(500);    
         });
    });
  &lt;/script&gt;
  </code></pre>