From 44cd5d4b567b1cd69c2b56f6b6b5da3f5e2f7042 Mon Sep 17 00:00:00 2001
From: Wu Cheng-Han
Date: Fri, 25 Sep 2015 14:22:45 +0800
Subject: Fixed for code consistency
---
public/js/extra.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/js/extra.js b/public/js/extra.js
index 084ebe8a..aed97417 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -226,7 +226,7 @@ function generateToc(id) {
'class': 'toc',
'targetId': id
});
- if(target.text() == 'undefined')
+ if (target.text() == 'undefined')
target.html('');
var backtotop = $('Back to top');
var gotobottom = $('Go to bottom');
@@ -262,7 +262,7 @@ function smoothHashScroll() {
// prevent default anchor click behavior
e.preventDefault();
// animate
- $('html, body').animate({
+ $('body, html').stop(true, true).animate({
scrollTop: $(hash).offset().top
}, 100, "linear", function () {
// when done, add hash to url
--
cgit v1.2.3