diff options
author | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-05-14 11:25:52 +0300 |
---|---|---|
committer | amazingrise <8315221+AmazingRise@users.noreply.github.com> | 2021-05-14 11:25:52 +0300 |
commit | 755df67fc2aae5d27691cce9b572d704afa8b3a3 (patch) | |
tree | e2808ac064e474e163ff650fedda079091a60a6d | |
parent | cc8287964b4d52b203f56efc87181dbbab42979e (diff) |
Auto collapse disabled by default.
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | static/js/toc-collapse.js | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index d142f2d..988ee11 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -65,7 +65,7 @@ {{ end }} {{ if and (not (.Params.disableToC) ) (.IsPage) }} - {{ if .Site.Params.disableAutoCollapse }} + {{ if not .Site.Params.enableAutoCollapse }} <script src="{{"/js/toc.js" | relURL}}"></script> {{ else }} <script src="{{"/vendor/js/jquery.min.js" | relURL}}" ></script> diff --git a/static/js/toc-collapse.js b/static/js/toc-collapse.js index 427b2e5..e215a97 100644 --- a/static/js/toc-collapse.js +++ b/static/js/toc-collapse.js @@ -51,11 +51,6 @@ var collapseOthers = function (currentIndex) { $(this).collapse("hide"); }); } -$().ready(function () { - spy(); - $(window).bind('scroll', debounce(spy, 250, { 'maxWait': 1000 })); -}); - //From https://github.com/lodash/lodash/blob/master/debounce.js // and https://github.com/lodash/lodash/blob/master/isObject.js |