summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author阔落 <45323514+BigCoke233@users.noreply.github.com>2019-04-06 16:13:34 +0800
committerGitHub <noreply@github.com>2019-04-06 16:13:34 +0800
commit1f6cf3faefcd4b3b99c2ef58351f0722b97297bf (patch)
tree254e1ca993ff9bba0c3eb9b297c0f8ba85cc4039
parent42e0fe9139261d1af929d3ce82816143a95738eb (diff)
Add files via upload
-rw-r--r--includes/footer.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/footer.php b/includes/footer.php
index 2519bbe..eedc7a0 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -53,7 +53,14 @@
}
);
$(document).on('pjax:send',
- function() {
+ function() {
+ (function smoothscroll(){
+ var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
+ if (currentScroll > 0) {
+ window.requestAnimationFrame(smoothscroll);
+ window.scrollTo (0,currentScroll - (currentScroll/5));
+ }
+ })();
$('#pjax-container').addClass("pjax-loading");
NProgress.start();
})