diff options
-rw-r--r-- | layouts/partials/journal.html | 2 | ||||
-rw-r--r-- | static/js/toc-collapse.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/journal.html b/layouts/partials/journal.html index 83b8041..32d917b 100644 --- a/layouts/partials/journal.html +++ b/layouts/partials/journal.html @@ -279,7 +279,7 @@ app = new Vue({ {{ if and (not (.Params.disableToC) ) (.IsPage) }} spy(); - window.addEventListener('wheel', this.debounce(spy, 250, { 'maxWait': 1000 }), false); + window.addEventListener('scroll', this.debounce(spy, 250, { 'maxWait': 250 }), false); {{ end }} }, diff --git a/static/js/toc-collapse.js b/static/js/toc-collapse.js index e215a97..d9ffe1e 100644 --- a/static/js/toc-collapse.js +++ b/static/js/toc-collapse.js @@ -31,6 +31,9 @@ var spy = function () { collapseOthers(currentIndex); } +var onNavClick = function () { + spy() +} var collapseOthers = function (currentIndex) { if (currentIndex == -1) { |