Rectangle 27 0

javascript How to add a scroll to top floating button in volusion site?

<style type="text/css">
.scrollToTop {position:fixed;bottom:100px;right:100px;}

<a class="scrollToTop" href="javascript:scrollToTop();">Scroll to top</a>

<script type="text/javascript">
function scrollToTop() {
    $(window).scrollTop(0); // If you work with jQuery,
    document.body.scrollTop = 0; // Or not.

I edited the answer. Check that again.

Its working now. Thanks a lot.

Its working. Thanks. How do I make it float on the right bottom? Yes, I am working on jQuery site.

Thanks for your help but unfortunately it doesnt work. I pasted the code inside <head> </head>.

Try paste the code inside <body> section. Do you work with jQuery?

You can try like this.