forked from anandsinghyadav/Ebay-Website-Clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
collectiblesAndArt.js
130 lines (103 loc) · 3.29 KB
/
collectiblesAndArt.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
let flag = true;
const openSomething = (value) => {
if (value == 'anti' && flag == true) {
document.getElementById("anti").style.display = "block";
flag = false;
}
else {
document.getElementById("anti").style.display = "none";
flag = true;
}
if (value == 'art') {
document.getElementById("art").style.display = "block";
}
else {
document.getElementById("art").style.display = "none";
}
if (value == 'collectibles') {
document.getElementById("collectibles").style.display = "block";
}
else {
document.getElementById("collectibles").style.display = "none";
}
if (value == 'artAndCraft') {
document.getElementById("artAndCraft").style.display = "block";
}
else {
document.getElementById("artAndCraft").style.display = "none";
}
if (value == 'coins') {
document.getElementById("coins").style.display = "block";
}
else {
document.getElementById("coins").style.display = "none";
}
if (value == 'dollsAndTeddy') {
document.getElementById("dollsAndTeddy").style.display = "block";
}
else {
document.getElementById("dollsAndTeddy").style.display = "none";
}
if (value == 'entertainment') {
document.getElementById("entertainment").style.display = "block";
}
else {
document.getElementById("entertainment").style.display = "none";
}
if (value == 'pottery') {
document.getElementById("pottery").style.display = "block";
}
else {
document.getElementById("pottery").style.display = "none";
}
if (value == 'stamps') {
document.getElementById("stamps").style.display = "block";
}
else {
document.getElementById("stamps").style.display = "none";
}
if (value == 'vintage') {
document.getElementById("vintage").style.display = "block";
}
else {
document.getElementById("vintage").style.display = "none";
}
}
const goFun = (value) => {
if (value == '1') {
localStorage.setItem("search_term", "stamps");
window.location.href = "stamps.html";
}
else if (value == '2') {
localStorage.setItem("search_term", "comics");
window.location.href = "comics.html";
}
else if (value == '3') {
localStorage.setItem("search_term", "coins and paper money");
window.location.href = "coinsAndPaperMoney.html";
}
else if (value == '4') {
localStorage.setItem("search_term", "records");
window.location.href = "recordandPlayer.html";
}
else if (value == '5') {
localStorage.setItem("search_term", "antique");
window.location.href = "antiques.html";
}
else if (value == '6') {
localStorage.setItem("search_term", "vintage");
window.location.href = "vintage.html";
}
else if (value == '7') {
localStorage.setItem("search_term", "postcard");
window.location.href = "collectibles.html";
}
else if (value == '8') {
localStorage.setItem("search_term", "action");
window.location.href = "actionAndFigure.html";
}
else if (value == '9') {
localStorage.setItem("search_term", "entertainment");
window.location.href = "entertainment.html";
}
}