summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--static/css/style.css2
-rw-r--r--static/js/toc.js27
2 files changed, 14 insertions, 15 deletions
diff --git a/static/css/style.css b/static/css/style.css
index c75427c..26900e0 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -234,7 +234,7 @@ img.right {
/* Table of contents */
-#contentheader {
+#tocheader {
display: none;
}
diff --git a/static/js/toc.js b/static/js/toc.js
index 5fbba70..5ef8545 100644
--- a/static/js/toc.js
+++ b/static/js/toc.js
@@ -1,17 +1,16 @@
function createToc(pages) {
- var tdiv = document.getElementById("toc");
- if (tdiv)
- {
- var a = tdiv.appendChild(document.createElement('span'));
- // a.onclick = showhideToc;
- a.id = 'contentheader';
- a.innerHTML = 'Contents';
+ var tdiv = document.getElementById('toc');
+ if (tdiv) {
+ var header = tdiv.appendChild(document.createElement('span'));
+ // header.onclick = showhideToc;
+ header.id = 'tocheader';
+ header.innerHTML = 'Contents';
- var ldiv = tdiv.appendChild(document.createElement('ul'));
- ldiv.id = 'innertoc';
+ var tul = tdiv.appendChild(document.createElement('ul'));
+ tul.id = 'innertoc';
for (key in pages) {
- var link = ldiv.appendChild(document.createElement('li')).appendChild(document.createElement('a'));
+ var link = tul.appendChild(document.createElement('li')).appendChild(document.createElement('a'));
link.innerHTML = pages[key];
link.className = 'tocLink';
link.href = '#' + key;
@@ -24,8 +23,8 @@ function createToc(pages) {
var TocState = 'none';
function showhideToc() {
- TocState = (TocState == 'none') ? 'block' : 'none';
- var newText = (TocState == 'none') ? 'show page contents' : 'hide page contents';
- document.getElementById('contentheader').innerHTML = newText;
- document.getElementById('innertoc').style.display = TocState;
+ TocState = (TocState == 'none') ? 'block' : 'none';
+ var newText = (TocState == 'none') ? 'show page contents' : 'hide page contents';
+ document.getElementById('tocheader').innerHTML = newText;
+ document.getElementById('innertoc').style.display = TocState;
}