Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/carsonip/hugo-theme-minos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/article.html')
-rw-r--r--layouts/partials/article.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/layouts/partials/article.html b/layouts/partials/article.html
index def6103..39674f1 100644
--- a/layouts/partials/article.html
+++ b/layouts/partials/article.html
@@ -49,13 +49,6 @@
if ($toc.length > 0) {
var $window = $(window);
- $window.on('scroll', onScroll);
- $(document).ready(function() {
- $toc.find('a').parent('li').find('ul').hide();
- onScroll();
- document.getElementsByClassName('article-toc')[0].style.display = '';
- });
-
function onScroll(){
var currentScroll = $window.scrollTop();
var h = $('.article-entry h1, .article-entry h2, .article-entry h3, .article-entry h4, .article-entry h5, .article-entry h6');
@@ -76,6 +69,13 @@
$(e).children('a').addClass('active').siblings('ul').show();
});
}
+
+ $window.on('scroll', onScroll);
+ $(document).ready(function() {
+ $toc.find('a').parent('li').find('ul').hide();
+ onScroll();
+ document.getElementsByClassName('article-toc')[0].style.display = '';
+ });
}
})();
</script>