Fix start TOC initial hide sublist

This commit is contained in:
Carson Ip
2017-02-26 18:29:31 +01:00
parent cbe7676c74
commit eadc8b400f

View File

@@ -51,7 +51,7 @@
$window.on('scroll', onScroll); $window.on('scroll', onScroll);
$(document).ready(function() { $(document).ready(function() {
$toc.find('a').parent('li').siblings('ul').hide(); $toc.find('a').parent('li').find('ul').hide();
onScroll(); onScroll();
document.getElementsByClassName('article-toc')[0].style.display = ''; document.getElementsByClassName('article-toc')[0].style.display = '';
}); });
@@ -96,4 +96,4 @@
{{ end }} {{ end }}
</div> </div>
{{ partial "nav.html" . }} {{ partial "nav.html" . }}
</article> </article>