diff options
-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 |