title: javascript smooth scroll on click
body: <p>I'm using this link:</p>
  
  <pre><code>&lt;a class="" onclick="location.href='#top'" href="superContent"&gt;superContent&lt;/a&gt;
  </code></pre>
  
  <p>It does two things at once:</p>
  
  <ol>
  <li>Jumps user to top of the page</li>
  <li>Performs this other (unrelated) ajax load function</li>
  </ol>
  
  <p>Everything works great, except I'm trying to figure out how to get it to scroll to the top more smoothly. I've tried adding .scroll to attach it to my jquery scrollTo plugin, but nothing happens, which probably has something to do with the fact that I'm using javascript onclick, while the href attribute does something else entirely.</p>
  
  <p>Is there a way to attach animated smooth-scrolling to onclick="location.href='#top'" ?</p>