Sha256: bae6b607b9969fe7a6db46d854a1135ef54b5c31d3e4c7c9ddfe6f40a6b40ab3

Contents?: true

Size: 787 Bytes

Versions: 1

Compression:

Stored size: 787 Bytes

Contents

<script>
    // ===== Scroll to Top ====
    $(window).scroll(function() {

        if ($(this).scrollTop() >= 50) {        // If page is scrolled more than 50px
            $('#return-to-top').fadeIn(200);    // Fade in the arrow
        } else {
            $('#return-to-top').fadeOut(200);   // Else fade out the arrow
        }
    });
    $('#return-to-top').click(function() {      // When arrow is clicked
        $('body,html').animate({
            scrollTop : 0                       // Scroll to top of body
        }, 500);
    });
    // ===== ./Scroll to Top ====


</script>
<div class="fixed-action-btn back2top">
    <a  href="#" id="return-to-top" class="btn-floating btn-large waves-effect waves-light black"><i class="material-icons">keyboard_arrow_up</i></a>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-theme-anc-0.1.2 _includes/go2top.html