-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuserProfile.js
40 lines (32 loc) · 1.14 KB
/
userProfile.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
document.getElementById("order").addEventListener("click",order);
function order(){
window.location.href="Ncart.html";
}
document.getElementById("address").addEventListener("click",address);
function address(){
window.location.href="Ncart.html";
}
document.getElementById("payment").addEventListener("click",payment);
function payment(){
window.location.href="Ncart.html";
};
var usermail=document.getElementsByClassName("usermail")
var mail=JSON.parse(localStorage.getItem("loginData"));
var index=mail.length-(mail.length-1);
console.log(index);
var usermail=mail[index]["loginEmail"];
console.log(usermail)
usermail.innertext=usermail;
console.log(usermail.innertext);
const body = document.body;
let lastScroll = 0;
window.addEventListener("scroll", () => {
if (window.pageYOffset >= 336) {
document.querySelector(".section").style.display = "flex";
document.querySelector(".section").style.position = "sticky";
document.querySelector(".section").style.top = "0";
document.querySelector(".section").style.zIndex = "200";
} else {
document.querySelector(".section").style.display = "none";
}
});