Skip to content

Commit

Permalink
Added animation to totop-scroller
Browse files Browse the repository at this point in the history
  • Loading branch information
dengenxp committed Dec 11, 2016
1 parent 21ffc97 commit 762b256
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion public_html/layout/denim/footer.thtml
Expand Up @@ -20,7 +20,7 @@
</div>
</footer>

<div id="totop-scroller" data-uk-smooth-scroll>
<div id="totop-scroller" style="display: none;" data-uk-smooth-scroll>
<i class="uk-icon-chevron-circle-up"></i>
</div>

Expand Down
9 changes: 9 additions & 0 deletions public_html/layout/denim/javascript/script.js
Expand Up @@ -90,4 +90,13 @@ $(function() {
break;
}
$('#header-content > a.tm-toggle').attr('data-uk-offcanvas', "{mode:'" + oc_mode + "'}");

var totop = $('#totop-scroller');
$(window).scroll(function() {
if ($(this).scrollTop() > 400) {
totop.fadeIn();
} else {
totop.fadeOut();
}
});
});

0 comments on commit 762b256

Please sign in to comment.