summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAnna Knoerr <an.kn@protonmail.ch>2022-01-30 01:51:27 +0100
committerAnna Knoerr <an.kn@protonmail.ch>2022-01-30 01:51:27 +0100
commit07dbc99e5de19eea42a69a69cbda5daeed19d831 (patch)
tree6c655de0eac1525318662fbcf2e06c78ded0c3cb /scripts
parente75b585867b431f7e30e9ad03560900508395be2 (diff)
add main.js
Diffstat (limited to 'scripts')
-rw-r--r--scripts/main.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/main.js b/scripts/main.js
new file mode 100644
index 0000000..81378c5
--- /dev/null
+++ b/scripts/main.js
@@ -0,0 +1,22 @@
+function openConcept(evt, ConceptName) {
+ var i, x, tablinks;
+ x = document.getElementsByClassName("concept");
+ for (i = 0; i < x.length; i++) {
+ x[i].style.display = "none";
+ }
+ tablinks = document.getElementsByClassName("tablink");
+ for (i = 0; i < x.length; i++) {
+ tablinks[i].className = tablinks[i].className.replace(" w3-border-red", "");
+ }
+ document.getElementById(ConceptName).style.display = "block";
+ evt.currentTarget.firstElementChild.className += " w3-border-red";
+}
+
+function Dropdown(id) {
+ var x = document.getElementById(id);
+ if (x.className.indexOf("w3-show") == -1) {
+ x.className += " w3-show";
+ } else {
+ x.className = x.className.replace(" w3-show", "");
+ }
+}