summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-09-25 14:22:45 +0800
committerWu Cheng-Han2015-09-25 14:22:45 +0800
commit44cd5d4b567b1cd69c2b56f6b6b5da3f5e2f7042 (patch)
tree5e90fdc7a22578d0466697ba05cea3cf38290e69 /public/js
parent376a759df7f1e3b4af9402c2127ca67bdba982a3 (diff)
Fixed for code consistency
Diffstat (limited to 'public/js')
-rw-r--r--public/js/extra.js4
1 files 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 = $('<a class="back-to-top" href="#">Back to top</a>');
var gotobottom = $('<a class="go-to-bottom" href="#">Go to bottom</a>');
@@ -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