title: How to scrollTop when html, body is set to height: 100%?
body: <p>The following won't work unless I remove <code>height: 100%</code> from body and html. However, i need that style as I am using it for other elements on the page.</p>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;a href="#" id="scrollTop"&gt;Back to top&lt;/a&gt;
  </code></pre>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>$("#scrollTop").on("click",function(e){
    e.preventDefault();
    $(window).animate({scrollTop: 0}, 'slow');
  });
  </code></pre>
  
  <p>Even tried the following with still negative results</p>
  
  <pre><code>$("#scrollTop").on("click",function(e){
    e.preventDefault();
    $("body, html").animate({scrollTop: 0}, 'slow');
  });
  </code></pre>
  
  <p><strong>Css</strong></p>
  
  <pre><code>html, body {height:100%; min-height:100%;}
  </code></pre>