diff options
author | 2019-04-14 17:00:43 +0100 | |
---|---|---|
committer | 2019-04-14 17:00:43 +0100 | |
commit | cc5f3b7321c6992e0c7e324c735bb5272d8e5ae3 (patch) | |
tree | d5c9e5396f3c02e0673f742c0b0bbd41162fc66c /pydis_site/static | |
parent | Remove attachments plugin, add plugin templates (diff) |
Modals and breadcrumb work
Diffstat (limited to 'pydis_site/static')
-rw-r--r-- | pydis_site/static/js/wiki/modal.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pydis_site/static/js/wiki/modal.js b/pydis_site/static/js/wiki/modal.js new file mode 100644 index 00000000..01252575 --- /dev/null +++ b/pydis_site/static/js/wiki/modal.js @@ -0,0 +1,13 @@ +function open_modal(id) { + let element = document.getElementById(id); + + $(element).addClass("is-active"); + + $(element).find(".modal-background").click(function() { + $(element).removeClass("is-active"); + }); + + $(element).find("[aria-label=\"close\"]").click(function() { + $(element).removeClass("is-active"); + }); +} |