Skip to content

Commit 59cbc0f

Browse files
Update main.js
1 parent cf6800f commit 59cbc0f

File tree

1 file changed

+9
-3
lines changed
  • project-9-dice-roll-simulator

1 file changed

+9
-3
lines changed
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
1+
// ----------
22

33
const buttonEl = document.getElementById("roll-button");
44

5+
const diceEl = document.getElementById("dice");
6+
57
buttonEl.addEventListener("click", ()=> {
6-
console.log("Clicked!");
7-
})
8+
// console.log("Clicked!");
9+
diceEl.classList.add("roll-animation");
10+
setTimeout( () => {
11+
diceEl.classList.remove("roll-animation");
12+
}, 1000);
13+
})

0 commit comments

Comments
 (0)