-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
45 lines (40 loc) · 1.26 KB
/
main.js
File metadata and controls
45 lines (40 loc) · 1.26 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
const hobbyBtn = document.querySelector("#hobby_btn");
const schoolsBtn = document.querySelector("#schools_btn");
const portfolioBtn = document.querySelector("#portfolio_btn");
hobbyBtn.onclick = function() {
const div = document.querySelector(".hobby_list");
if (div.className === "hobby_list") {
div.className = "hobby_list active";
}
else {
div.className = "hobby_list";
}
};
schoolsBtn.onclick = function() {
const div = document.querySelector(".schools_table");
if (div.className === "schools_table") {
div.className = "schools_table active";
}
else {
div.className = "schools_table";
}
};
portfolioBtn.onclick = function() {
const div = document.querySelector(".portfolio_content");
if (div.className === "portfolio_content") {
div.className = "portfolio_content active";
}
else {
div.className = "portfolio_content";
}
};
function fullScreen() {
const imgs = document.querySelectorAll(".image");
const fullPage =document.querySelector("#fullpage")
imgs.forEach(img => {
img.addEventListener("click", function () {
fullPage.style.backgroundImage = 'url(' + img.src + ')';
fullPage.style.display = 'block';
});
});
}