parent
9ab6b65570
commit
c306300f2c
5 changed files with 8 additions and 121 deletions
@ -1,20 +0,0 @@ |
|||||||
window.addEventListener("load", () => { |
|
||||||
document.querySelectorAll("figure.enlargable").forEach(node => { |
|
||||||
node.addEventListener("click", () => { |
|
||||||
console.log("Hey"); |
|
||||||
node.classList.toggle("enlarged") |
|
||||||
}) |
|
||||||
}) |
|
||||||
|
|
||||||
const keyDown = (e) => { |
|
||||||
if (e.keyCode !== 27) { |
|
||||||
return |
|
||||||
} |
|
||||||
|
|
||||||
document.querySelectorAll("figure.enlarged").forEach(node => { |
|
||||||
node.classList.remove("enlarged") |
|
||||||
}) |
|
||||||
} |
|
||||||
|
|
||||||
document.addEventListener('keydown', keyDown) |
|
||||||
}) |
|
Loading…
Reference in new issue