diff options
author | 2020-10-07 16:10:17 +0300 | |
---|---|---|
committer | 2020-10-07 16:10:17 +0300 | |
commit | 469bbb9da632e8dfe787b7a446bfacfd55b5c5ad (patch) | |
tree | ea8abddca51e42ebdf6422b4b72baa307d658cfd /pydis_site/static/js/wiki/dropdown.js | |
parent | Update guides URL to match with latest changes in #393 (diff) | |
parent | Merge pull request #405 from python-discord/remove_django_wiki (diff) |
Merge branch 'dewikification' into resources-home
Diffstat (limited to 'pydis_site/static/js/wiki/dropdown.js')
-rw-r--r-- | pydis_site/static/js/wiki/dropdown.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/pydis_site/static/js/wiki/dropdown.js b/pydis_site/static/js/wiki/dropdown.js deleted file mode 100644 index a914a4ab..00000000 --- a/pydis_site/static/js/wiki/dropdown.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() { - window.dropdowns = {}; - - let elements = document.getElementsByClassName("dropdown"); - - for (let element of elements) { - let menu_element = element.getElementsByClassName("dropdown-menu")[0]; - - function show() { - $(element).addClass("is-active"); - } - - function hide() { - $(element).removeClass("is-active"); - } - - function handle_event(e) { - show(); - - $(document.body).on("click." + menu_element.id, function() { - hide(); - - $(document.body).off("click." + menu_element.id); - }); - - e.stopPropagation(); - } - - $(element).click(handle_event); - $(element).hover(handle_event); - $(element).mouseleave(hide); - - window.dropdowns[menu_element.id] = element; - } -})(); |