diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 20:35:20 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-26 20:35:20 +0200 |
commit | 9f5ce300dbba1948bc3a9cc948829031f873651e (patch) | |
tree | c87411a8976326a66136dba9f8861a83c3e82bd5 /static/script.js | |
parent | Made .btn own css class. (diff) | |
download | calp-9f5ce300dbba1948bc3a9cc948829031f873651e.tar.gz calp-9f5ce300dbba1948bc3a9cc948829031f873651e.tar.xz |
Move a on event to inside, around body.
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js index 274bcb86..494b6266 100644 --- a/static/script.js +++ b/static/script.js @@ -135,7 +135,7 @@ function new_popup (event) { // if (event.target !== this) return; /* popup = this.children[0].children[0] */ - popup = this.parentElement.getElementsByClassName("popup")[0]; + popup = this.parentElement.parentElement.getElementsByClassName("popup")[0]; popup.classList.toggle("show") /* x-axis fix */ @@ -204,6 +204,7 @@ window.onload = function () { days = document.getElementsByClassName("days")[0] for (let e of days.getElementsByClassName("body")) { e.onclick = new_popup; + e.parentElement.href = "#"; } // days.scrollLeft == 0 |