<div id="page">
<h3>Top</h3>
*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>
*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>
*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>
*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>
*<br>*<br>*<br>*<br>*<br>*<br>*<br>*<br>
<button id="to-top">Scroll To Top</button>
</div>
jQuery("#to-top").click(function (){
jQuery('html, body').animate({
scrollTop: jQuery('#page').offset().top
}, 1200);
});
This Pen doesn't use any external CSS resources.