title: How to reach previous position on same page in java-script?
body: <p>I have a long <code>HTML page</code>, and on page I have given some <code>links</code> to open an <code>overlay</code> to show some data, and when I collapse the <code>overlay</code> I reach <code>top</code> of the page while if I clicked to open <code>overlay</code> at end of the page it should be reach at that position.</p>
  
  <p>I did <code>Google</code> but didn't get any proper solution.</p>
  
  <p>Here is my <code>jQuery</code> code</p>
  
  <p>This code is use to open <code>overlay</code></p>
  
  <pre><code> $(document.body).on('click', '.viewAllArt', function () {       
          $('.articleAll').css('display', 'none');
          $('.viewMain').css('display', 'none');
  
          $('.articleAll').css('display', 'block');
      });
  </code></pre>
  
  <p>This code use to close <code>overlay</code></p>
  
  <pre><code>   $('.collapsColony').click(function () {
          $('.articleAll').css('display', 'none');
          $('.articleAll').css('display', 'none');
          $('.viewMain').css('display', 'block');
      });
  </code></pre>
  
  <p>Sorry I don't have any <code>plunker</code> link to show, since most of the file is dependent to each other. </p>
  
  <p>Any suggestion will be helpful for me.</p>
  
  <p><strong>UPDATED</strong></p>