-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
47 lines (39 loc) · 1.05 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$(document).ready(() => {
console.log("JQuery Loaded");
if ($("#cartEmpty").length == 1) {
$("#purshace").css("visibility", "hidden");
} else {
$("#purshace").css("visibility", "visible");
}
const cart = $(".cart");
let cartOpen = 0;
$("#clickCart").on("click", () => {
if (cartOpen == 0) {
cartOpen++;
$(cart).css("display", "flex");
setTimeout(() => {
$(cart).width(600);
}, 130);
} else {
cartOpen--;
$(cart).width(0);
setTimeout(() => {
$(cart).hide();
}, 360);
}
});
if ($("#purshaceComplete").length == 1) {
$("body").css("cursor","wait");
confetti(
{
particleCount: 400,
spread: 300,
}
);
setTimeout(() => {
window.location.reload();
}, 3500);
}
const year = document.querySelector('#ano');
year.innerHTML = new Date().getFullYear();
});