-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
72 lines (64 loc) · 2.36 KB
/
Copy pathapp.js
File metadata and controls
72 lines (64 loc) · 2.36 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
$(".questions").click((event) => {
const id = event.target.id;
const newId = id.replace("q", "a");
const answer = document.createElement("p");
answer.classList.add("answers");
function transition() {
answer.classList.add("scrolling-start", "scrolling-end");
requestAnimationFrame(() => {
answer.classList.remove("scrolling-end");
});
}
function showAnswer(id) {
answer.id = newId;
$("#" + id).after(answer);
transition();
}
switch (id) {
case ("q1"):
if (!$("#a1").length) {
answer.innerHTML = "You can invite up to 2 additional users on the Free plan. There is no limit on team members for the Premium plan.";
showAnswer(id);
$("#a2, #a3, #a4, #a5").remove();
} else {
$("#" + newId).remove();
}
break;
case ("q2"):
if (!$("#a2").length) {
answer.innerHTML = "No more than 2GB. All files in your account must fit your allotted storage space.";
showAnswer(id);
$("#a1, #a3, #a4, #a5").remove();
} else {
$("#" + newId).remove();
}
break;
case ("q3"):
if (!$("#a3").length) {
answer.innerHTML = "Click “Forgot password” from the login page or “Change password” from your profile page. A reset link will be emailed to you.";
showAnswer(id);
$("#a2, #a1, #a4, #a5").remove();
} else {
$("#" + newId).remove();
}
break;
case ("q4"):
if (!$("#a4").length) {
answer.innerHTML = "Yes! Send us a message and we’ll process your request no questions asked.";
showAnswer(id);
$("#a2, #a3, #a1, #a5").remove();
} else {
$("#" + newId).remove();
}
break;
case ("q5"):
if (!$("#a5").length) {
answer.innerHTML = "Chat and email support is available 24/7. Phone lines are open during normal business hours.";
showAnswer(id);
$("#a2, #a3, #a4, #a1").remove();
} else {
$("#" + newId).remove();
}
break;
}
})