Open
Description
Via discussion in #14515.
This should be added to scrollTop():
Note that scrollTop can be used to read, but not write, the document scroll position. To scroll the document, animated or not, you have to call `scrollTop()` on the body element:
<pre><code>
// Without animation
$( document.body ).scrollTop( 500 );
// With animation
$( document.body ).animate({
scrollTop: 500
});
</code></pre>
Any examples elsewhere that suggest $( "html, body" ).animate({ scrollTop: ... }); are wrong, since this will cause the animation callback to get triggered twice.