Hide all of ToCs when absent
This commit is contained in:
parent
fce036fea8
commit
16c6775156
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ $(document).ready(function () {
|
|||
$('#TableOfContents').each(function () {
|
||||
var ele = $(this);
|
||||
if (ele.find('a').length <= 3) {
|
||||
ele.remove();
|
||||
ele.parent().remove();
|
||||
} else if (ele.children('ul').children('li').length === 1) {
|
||||
ele.children('ul').replaceWith(ele.children('ul').children('li').children('ul'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue