forked from Abhay0123/ripe-theory-3388
-
Notifications
You must be signed in to change notification settings - Fork 0
/
landingpage.js
45 lines (31 loc) · 1.03 KB
/
landingpage.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
34
35
36
37
38
39
40
41
42
43
44
45
function searchBtn() {
let from = document.querySelector("#input-label-from").value;
let to = document.querySelector("#input-label-to").value;
let onwardDate = document.querySelector("#input-label-onward-date").value;
// localStorage.setItem("from",from);
// localStorage.setItem("to",to);
// localStorage.setItem("onwardDate",onwardDate);
let obj = {
from: from,
to:to,
onwardDate:onwardDate,
};
localStorage.setItem("travelData:",JSON.stringify(obj));
}
function animate() {
var reveals = document.querySelectorAll(".animate");
for (var i = 0; i < reveals.length; i++) {
var windowHeight = window.innerHeight;
var elementTop = reveals[i].getBoundingClientRect().top;
var elementVisible = 50;
if (elementTop < windowHeight - elementVisible) {
reveals[i].classList.add("active");
} else {
reveals[i].classList.remove("active");
}
}
}
window.addEventListener("scroll", animate);
function myfun(){
window.location.href="signin.html";
}