-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
42 lines (35 loc) · 1.15 KB
/
Copy pathscript.js
File metadata and controls
42 lines (35 loc) · 1.15 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
// window.onscroll = function() {stickyHeader()};
// var header = document.getElementById("myHeader");
// var sticky = header.offsetTop;
// function stickyHeader() {
// if (window.pageYOffset > sticky) {
// header.classList.add("sticky");
// } else {
// header.classList.remove("sticky");
// }
// }
var aboutMe = document.getElementById("about")
var projects = document.getElementById("projects")
var footer = document.getElementById("contact")
topContainer = document.getElementById("top-container")
function aboutMeSlide() {
aboutMe.classList.remove("hide");
footer.classList.remove("hide");
aboutMe.classList.add("onload-slideLeft");
projects.classList.add("hide");
topContainer.classList.add("hide");
}
function projectsSlide() {
projects.classList.remove("hide");
footer.classList.remove("hide");
projects.classList.add("onload-slideRight");
aboutMe.classList.add("hide");
topContainer.classList.add("hide");
}
function contactsSlide() {
topContainer.classList.remove("hide");
footer.classList.add("hide");
topContainer.classList.add("onload-slideRight");
aboutMe.classList.add("hide");
projects.classList.add("hide");
}