diff options
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/footer.php | 9 |
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();
})
|
