title: .scroll() to top does not work with .location.reload();
body: <p>I am trying to use the jQuery <code>.location.reload();</code> to refresh the page and then <code>.scroll()</code> to scroll to the top of the page. Both functions work when implemented alone. </p>
  
  <p>However, when I try to implement both together, the page does not scroll to the top. It initially appears to scroll to the top but is then dragged back to the bottom of the page. </p>
  
  <pre><code>function cancelUpdate(){
      $(".cancel-update" ).click(function(event) {
           event.preventDefault();
           location.reload();
           $('html, body').animate({ scrollTop: 0 }, 'fast'); 
           setTimeout(function () {
               // $('html, body').animate({ scrollTop: 0 }, 'fast');   
           }, 5500);
       });
    } 
  </code></pre>
  
  <p>I tried setting the scroll to top within a <code>setTimeout</code> function- just  in case jQuery needed time to execute the function, but it was to no avail.</p>