Skip to content

Commit 13f5dcd

Browse files
committed
add confetti options
1 parent 67dff77 commit 13f5dcd

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

88-promo code/script.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
const present = document.getElementById("present");
2+
const options = {
3+
colors: [
4+
"#34D963",
5+
"#068C2C",
6+
"#FF5757",
7+
"#8C1414",
8+
"#D9D74A",
9+
"#1E91D9",
10+
"#1B608C",
11+
],
12+
};
213

314
present.addEventListener("mouseenter", () => {
4-
confetti();
15+
confetti(options);
516
});
617
present.addEventListener("touchstart", () => {
7-
confetti();
18+
confetti(colors);
819
});

0 commit comments

Comments
 (0)