diff options
author | ng0 <ng0@n0.is> | 2019-12-08 11:00:28 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-12-08 11:00:28 +0000 |
commit | 9975d6f250dee9a4d599d2c144b3700646290ca3 (patch) | |
tree | d64aac0ce4e15c370319c05d636d07fca8d8a312 /static/scroll.js | |
parent | eda66aa43040d9196b61a1a7e0bad7e7c5dee693 (diff) | |
parent | 2b9a55a928876e5d3ae3baa2908a99269880383a (diff) | |
download | www-9975d6f250dee9a4d599d2c144b3700646290ca3.tar.gz www-9975d6f250dee9a4d599d2c144b3700646290ca3.zip |
Merge branch 'master' into stable
Diffstat (limited to 'static/scroll.js')
-rw-r--r-- | static/scroll.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/static/scroll.js b/static/scroll.js new file mode 100644 index 00000000..1180588a --- /dev/null +++ b/static/scroll.js | |||
@@ -0,0 +1,12 @@ | |||
1 | $(window).scroll(function() { | ||
2 | if ($(this).scrollTop() >= 50) { | ||
3 | $('#jump-top').fadeIn(200); | ||
4 | } else { | ||
5 | $('#jump-top').fadeOut(200); | ||
6 | } | ||
7 | }); | ||
8 | $('#jump-top').click(function() { | ||
9 | $('html').animate({ | ||
10 | scrollTop : 0 | ||
11 | }, 500); | ||
12 | }); | ||