lars-m of PartnersCreative
12/4/2017 - 6:22 PM

Go To Top Scroll Button

add this html wherever and

HTML
<a href="#top"  class="goTop"><img src="gotop.png"/></a>


jQuery
<script type="text/javascript">
(function($) {          
    $(document).ready(function(){                    
        $(window).scroll(function(){                          
            if ($(this).scrollTop() > 1200) {
                $('.goTop').fadeIn(1300);
            } else {
                $('.goTop').fadeOut(1300);
            }
        });
    });
})(jQuery);
</script>

<script type='text/javascript'>
$('#goTop').on('click', function(e){
    $("html, body").animate({scrollTop: $("#top").offset().top}, 500);
});
</script>