forked from anandsinghyadav/Ebay-Website-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sell.js
52 lines (31 loc) · 1.2 KB
/
sell.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
46
47
48
document.querySelector("#rightdata > ul:nth-child(2) > button").addEventListener("click", function () {
window.scrollBy(0, 700)
})
document.querySelector("#rightdata > ul:nth-child(1) > button").addEventListener("click", function () {
window.scrollBy(0,432)
})
document.querySelector("#rightdata > ul:nth-child(3) > button").addEventListener("click", function () {
window.scroll(0, 1098)
})
document.querySelector("#rightdata > ul:nth-child(4) > button").addEventListener("click", function(){
window.scroll(0, 1500)
})
// if( window.scrollBy(0, 557))
document.addEventListener("scroll",function()
{
if(window.scrollY>500)
{
document.querySelector(".chamka").style.display="inline";
}
else{
document.querySelector(".chamka").style.display="none";
}
document.querySelector("#header").style.top=window.scrollY;
})
let faqinner = document.querySelectorAll(".faq2");
let faqmain = document.querySelectorAll(".faqclass");
for (let i = 0; i < faqmain.length; i++) {
faqmain[i].addEventListener("click", function () {
faqinner[i].style.display = "flex";
})
}