[#9] Update table of contents function

This commit is contained in:
Anastasiya Shamray 2023-05-29 17:18:27 +03:00 committed by Stanislav Bogatyrev
parent a3b5c7523e
commit 59820ed5c9

View file

@ -130,7 +130,9 @@
// table of contents
$('h2, h3, h4', '.content').each(function () {
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
if ($('#TableOfContents', '.content').length) {
$(this).append('<a class="title-link" href="#' + $(this).attr('id') + '">#</a>');
}
});