1. Home
  2. ReHub Theme
  3. Advanced tips and customizations
  4. How to add Scroll to top button on all pages

How to add Scroll to top button on all pages

In latest theme version we removed some floating elements from pages of site. It’s because they are not very important and grabs to much attention from users from another important floating elements like Floating buttons. Also, many floating elements can reduce site perfomance

If you want to return it back, use next code in theme option – general – footer JS

<script>
jQuery(window).scroll(function(){
       if (jQuery(this).scrollTop() > 500) {
          jQuery('#topcontrol').addClass('scrollvisible');
       } else {
          jQuery('#topcontrol').removeClass('scrollvisible');
       }
});    
</script>