title: Is there way to scroll to anchor rather than jump with javascript (something like smooth scroll)
body: <p>I have a large document with numbered anchor tags as shown below. And a textbox to punch the numbers in to go to anchor which uses <strong>window.location.hash</strong></p>
  
  <p>I am also using arrow keys to go next or previous anchors. I want to scroll to the anchor so to give some sense of direction.</p>
  
  <pre><code>&lt;a name="1"&gt;
  some text
  &lt;a name="2"&gt;
  some text
  &lt;a name="3"&gt;
  </code></pre>
  
  <p>here is my function</p>
  
  <pre><code>function updatePageNumber()
  {
      var pagenumber;
      pagenumber = document.getElementById('pageNumber').value;   
      window.location.hash =  pagenumber;
  }
  </code></pre>
  
  <p>Jumping to anchor is very ugly and people loose sense of direction in the text. So is there a way to scroll to anchor with JavaScript. I know there are lots of jQuery examples, but I don't know jQuery and couldn't find JavaScript. </p>
  
  <p>Most important reason is I want to see my page number on the address bar!</p>