From 59820ed5c97af782f0688cbbb6d416bb909db39a Mon Sep 17 00:00:00 2001 From: Anastasiya Shamray Date: Mon, 29 May 2023 17:18:27 +0300 Subject: [PATCH] [#9] Update table of contents function --- assets/js/script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/script.js b/assets/js/script.js index 79e87f2..7316daf 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -130,7 +130,9 @@ // table of contents $('h2, h3, h4', '.content').each(function () { - $(this).append('#'); + if ($('#TableOfContents', '.content').length) { + $(this).append('#'); + } });