-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
34 lines (26 loc) · 889 Bytes
/
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
let jobModal = document.getElementById("job-modal");
let researchModal = document.getElementById("research-modal");
let jobBtn = document.getElementById("job-btn");
let researchBtn = document.getElementById("research-btn");
jobBtn.onclick = function() {
jobModal.style.display = "block";
}
researchBtn.onclick = function() {
researchModal.style.display = "block";
}
var closeBtns = document.getElementsByClassName("close");
console.log(closeBtns);
closeBtns[0].onclick = function() {
jobModal.style.display = "none";
}
closeBtns[1].onclick = function() {
researchModal.style.display = "none";
}
// When the user clicks outside the modal box, close it
window.onclick = function(event) {
if (event.target == jobModal) {
jobModal.style.display = "none";
} else if (event.target == researchModal) {
researchModal.style.display = "none";
}
}