diff options
Diffstat (limited to 'dropdown-box.js')
| -rw-r--r-- | dropdown-box.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dropdown-box.js b/dropdown-box.js new file mode 100644 index 0000000..47461fb --- /dev/null +++ b/dropdown-box.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"); +} |
