diff options
author | 2022-01-30 14:29:48 +0100 | |
---|---|---|
committer | 2022-01-30 14:29:48 +0100 | |
commit | dda3e355ac31dc4b9629f2e9e63474bbba69d740 (patch) | |
tree | fd73941134e394abc8bddd71c5fb9bed9b91f816 /pydis_site/static/js/content/page.js | |
parent | Remove italics from resource cards. (diff) |
Refactor: collapsibles as a stand-alone component
Diffstat (limited to 'pydis_site/static/js/content/page.js')
-rw-r--r-- | pydis_site/static/js/content/page.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/pydis_site/static/js/content/page.js b/pydis_site/static/js/content/page.js deleted file mode 100644 index 366a033c..00000000 --- a/pydis_site/static/js/content/page.js +++ /dev/null @@ -1,13 +0,0 @@ -document.addEventListener("DOMContentLoaded", () => { - const headers = document.getElementsByClassName("collapsible"); - for (const header of headers) { - header.addEventListener("click", () => { - var content = header.nextElementSibling; - if (content.style.maxHeight){ - content.style.maxHeight = null; - } else { - content.style.maxHeight = content.scrollHeight + "px"; - } - }); - } -}); |