Elegant Scroll to Top - Back to top JavaScript plugin example – Position: top-center

You can check out the code below to set the parameters.
Position: top-center
Example code
<link rel="stylesheet" href="http://your-domain.com/elegant-scroll-to-top/css/elegant-scroll-to-top.min.css">
<script src="http://your-domain.com/elegant-scroll-to-top/js/elegant-scroll-to-top.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
    var elegantScrollToTop = new ElegantScrollToTop({        
        position: 'top-center'
    });
    elegantScrollToTop.init();
});
</script>
Related options
Peoprty Possible Values Default Value Description
position 'bottom-left', 'bottom-center', 'bottom-right', 'top-left', 'top-center', 'top-right', 'center-left', 'center-right' 'bottom-right' The position where the button appears.