pipefall/index.js

18 lines
369 B
JavaScript
Raw Normal View History

2023-04-23 11:01:25 -07:00
(function () {
"use strict";
const pipefall = document.getElementById("pipefall");
const now = document.getElementById("play-now");
const play = () => {
console.log("pipefall!");
pipefall.play();
};
now.addEventListener("click", play);
2023-04-23 11:18:26 -07:00
for (let pipe of document.querySelectorAll(".pipe")) {
pipe.addEventListener("click", play);
}
2023-04-23 11:01:25 -07:00
})();