-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracker.js
30 lines (25 loc) · 801 Bytes
/
tracker.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
function showMoodDrop() {
document.getElementById("mood").classList.toggle("show");
}
function showFeelingsDrop() {
document.getElementById("getAlong").classList.toggle("show");
}
function showResults(option) {
var content = document.getElementsByClassName('resolution');
for (let i=0; i<content.length; i++) {
content[i].style.display = "none";
}
document.getElementById(option).style.display = "block";
}
window.onclick = function(event) {
if (!event.target.matches('.dropdownbutton')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}