diff options
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r-- | layouts/partials/scripts.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 2f83c91..fd5aa3b 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -60,6 +60,17 @@ }); </script> {{ end }} +{{ if in .Site.Params.mainSections .Type }} +<!-- toc smooth scroll & aplayer cjk html anchor fix --> +<script> + $("#widget-toc a").click(function () { + $("html, body").animate({ + scrollTop: $($(this).attr("href")).offset().top + }); + return false; + }); +</script> +{{ end }} {{ if .Site.Params.scrollTop }} <!-- scroll to top button --> <script> |