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('#');
+ }
});