-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
75 lines (71 loc) · 1.88 KB
/
Copy pathscript.js
File metadata and controls
75 lines (71 loc) · 1.88 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
var face_1 = document.querySelector(".face1");
var face_2 = document.querySelector(".face2");
var face_3 = document.querySelector(".face3");
var face_4 = document.querySelector(".face4");
function face1() {
gsap.to(face_1, {
duration: 3,
x: 680,
y: 50,
onComplete: function () {
Swal.fire({
icon: "error",
title: "Wrong Answer",
text: "Better luck next-time",
// footer: '<a href="#">Why do I have this issue?</a>'
});
}
});
}
function face2() {
gsap.to(face_2, {
duration: 3,
x: 675,
y: -60,
onComplete: function () {
Swal.fire({
icon: "error",
title: "Wrong Answer",
text: "Better luck next-time",
// footer: '<a href="#">Why do I have this issue?</a>'
});
}
});
}
function face3() {
gsap.to(face_3, {
duration: 3,
x: 677,
y: -160,
onComplete: function () {
Swal.fire({
icon: "success",
title: "Congratulations!",
text: "Your answer is correct",
// footer: '<a href="#">Why do I have this issue?</a>'
});
}
});
}
function face4() {
gsap.to(face_4, {
duration: 3,
x: 675,
y: -260,
onComplete: function () {
Swal.fire({
icon: "error",
title: "Wrong Answer",
text: "Better luck next-time",
// footer: '<a href="#">Why do I have this issue?</a>'
});
}
});
}
function resetTheFacesOfDevil() {
gsap.to(face_1,face_2,face_3,face_4, {
duration: 2,
x: 0,
y: 0
});
}