First to H1 (if it is not, then it scrolls to the height of the screen), then up.
Here's the demo.
Third-party libraries are not needed.
Get the latest release from the releases page.
Before your closing </body>
tag add:
<script src="js/button-up-down.js"></script>