-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (31 loc) · 935 Bytes
/
index.js
File metadata and controls
37 lines (31 loc) · 935 Bytes
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
window.addEventListener("scroll", reveal);
function reveal() {
var reveals = document.querySelectorAll(".reveal");
for (var i = 0; i < reveals.length; i++) {
var windowheight = window.innerHeight;
var revealtop = reveals[i].getBoundingClientRect().top;
var revealPoint = 150;
if (revealtop < windowheight - revealPoint) {
reveals[i].classList.add("active");
} else {
reveals[i].classList.remove("active");
}
}
}
document.getElementById("proSet").addEventListener("click", design);
var pro = document.getElementById("container");
function design() {
if (pro.style.display == "none") {
pro.style.display = "flex";
} else {
pro.style.display = "none";
}
}
if(localStorage.getItem("sign-Up")) {
document.querySelector("#logInBtn").style.display = "none";
}
function homePage() {
if(localStorage.getItem("sign-Up")) {
window.open("./home.html","_self");
}
}