summaryrefslogtreecommitdiff
path: root/dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'dropdown.js')
-rw-r--r--dropdown.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/dropdown.js b/dropdown.js
new file mode 100644
index 0000000..47461fb
--- /dev/null
+++ b/dropdown.js
@@ -0,0 +1,7 @@
+function toggleDropdown(headerClicked) {
+ let body = headerClicked.nextElementSibling;
+ let arrow = headerClicked.children[1];
+
+ body.classList.toggle("open");
+ arrow.classList.toggle("open");
+}