diff --git a/sticker.js b/sticker.js index 05a12e2..9fd3e33 100644 --- a/sticker.js +++ b/sticker.js @@ -32,6 +32,14 @@ function percentagePosition(e, target) { } window.addEventListener("click", (e) => { + placeSticker(e); +}); + +window.addEventListener("touchstart", (e) => { + placeSticker(e); +}); + +function getInput(e) { placeSticker(percentagePosition(e, stickerContainer), infoList[loopIndex]); // Cringe sorry @@ -40,7 +48,7 @@ window.addEventListener("click", (e) => { } else { loopIndex = 0; } -}); +} function placeSticker(position, element) { let sticker = element.cloneNode(true);