Change the ToC hiding rule.

Adapt to bootstrap-toc plugins.
This commit is contained in:
Cotes Chung 2019-12-05 23:11:52 +08:00
parent 924cfa7426
commit 9992e11228
2 changed files with 2 additions and 5 deletions

View File

@ -7,10 +7,7 @@
$(function() {
if ($("#post-wrap .post-content h1").length == 0
&& $("#post-wrap .post-content h2").length == 0
&& $("#post-wrap .post-content h3").length == 0
&& $("#post-wrap .post-content h4").length == 0
&& $("#post-wrap .post-content h5").length == 0) {
&& $("#post-wrap .post-content h2").length == 0) {
$("#toc-wrap").addClass("hidden");
}
});

View File

@ -1 +1 @@
$(function(){if($("#post-wrap .post-content h1").length==0&&$("#post-wrap .post-content h2").length==0&&$("#post-wrap .post-content h3").length==0&&$("#post-wrap .post-content h4").length==0&&$("#post-wrap .post-content h5").length==0){$("#toc-wrap").addClass("hidden")}});
$(function(){if($("#post-wrap .post-content h1").length==0&&$("#post-wrap .post-content h2").length==0){$("#toc-wrap").addClass("hidden")}});