-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnavbar.js
319 lines (244 loc) · 10.9 KB
/
navbar.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
var data = [
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/13280761-1244901837402433.jpg",
prodetails:"Sunday Riley The Big Glow Deluxe Good Genes Kit - $309 Value",
saleoff:"Sunday Riley Gift ",
star: "★★★★★335",
MSRP: "MSRP:",
strikedOffPrice:" $189.00",
price:"$35.00",
quick:"QUICK BUY"
}, {
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/13280763-1044900046578932.jpg",
prodetails:"Sunday Riley Morning Buzz Brightening Duo - $150 Value",
saleoff:"Sunday Riley Gift ",
star: "★★★★★145",
MSRP: "MSRP:",
strikedOffPrice:" $190.00",
price:"$35.00",
quick:"QUICK BUY"
},{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/11719722-1134871560028310.jpg",
prodetails:"Lancer Skincare Omega Hydrating Oil with Ferment Complex (1 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★67",
MSRP: "MSRP:",
strikedOffPrice:" $209.00",
price:"$135.00",
quick:"QUICK BUY"
},
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/12898514-1494918159467819.jpg",
prodetails:"SENTÉ Dermal Repair Cream (1.7 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★348",
MSRP: "MSRP:",
strikedOffPrice:" $180.00",
price:"$35.00",
quick:"QUICK BUY"
}
];
data.map(function(elem){
var div1 = document.createElement("div");
div1.setAttribute("id", "div1")
var div2 = document.createElement("div")
div2.setAttribute("id" ,"div2");
var div4=document.createElement("div")
div4.setAttribute("id" , "div4")
var img1 = document.createElement("img")
img1.setAttribute("id","img1")
img1.setAttribute("src" , elem.imgUrl)
var div3 = document.createElement("div");
div3.setAttribute("id" , "div3")
var h2 = document.createElement("p")
h2.textContent = elem.prodetails;
var ptext = document.createElement("p")
ptext.textContent = elem.saleoff;
var div5 = document.createElement("div");
div5.setAttribute("id" , "div5")
div5.textContent = elem.star;
var div6 = document.createElement("div");
div6.setAttribute("id" , "div6")
var pm = document.createElement("p");
pm.textContent = elem.MSRP;
var ps = document.createElement("p");
ps.textContent = elem.strikedOffPrice;
ps.setAttribute("id" , "ps")
var div7= document.createElement("h3")
div7.setAttribute("id","hh");
div7.textContent = elem.price;
var div8 = document.createElement("div")
div8.setAttribute("id" ,"div8")
var btn1= document.createElement("button")
btn1.setAttribute("id", "btn1")
btn1.textContent =elem.quick
div8.append(btn1)
div6.append(pm,ps)
div3.append(ptext)
div4.append(h2);
div2.append(img1);
div1.append(div2,div4,div3,div5,div6,div7,div8)
document.querySelector(".main").append(div1)
})
// fifth Pert
var data1 = [
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/11290635-2054892767941057.jpg",
prodetails:"SkinCeuticals Triple Lipid Restore 242 (1.6 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★34",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
}, {
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/12902892-1954869141433701.jpg",
prodetails:"Sunday Riley Morning Buzz Brightening Duo - $150 Value",
saleoff:"Sunday Riley Gift ",
star: "★★★★★567",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
},{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/11719722-1134871560028310.jpg",
prodetails:"iS Clinical Youth Intensive Creme (1.7 oz.).",
saleoff:"Sunday Riley Gift ",
star: "★★★★★752",
MSRP: "MSRP:",
strikedOffPrice:"$150.00",
price:"$135.00",
quick:"QUICK BUY"
},
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/1600/1600/11833559-2544781056254810.jpg",
prodetails:"SENTÉ Dermal Repair Cream (1.7 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★87",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
}
];
data1.map(function(elem){
var sdiv1 = document.createElement("div");
sdiv1.setAttribute("id", "sdiv1")
var sdiv2 = document.createElement("div")
sdiv2.setAttribute("id" ,"sdiv2");
var sdiv4=document.createElement("div")
sdiv4.setAttribute("id" , "sdiv4")
var img = document.createElement("img")
img.setAttribute("src" , elem.imgUrl)
var sdiv3 = document.createElement("div");
sdiv3.setAttribute("id" , "sdiv3")
var h2 = document.createElement("p")
h2.textContent = elem.prodetails;
var ptext = document.createElement("p")
ptext.textContent = elem.saleoff;
var sdiv5 = document.createElement("div");
sdiv5.setAttribute("id" , "sdiv5")
sdiv5.textContent = elem.star;
var sdiv6 = document.createElement("div");
sdiv6.setAttribute("id" , "div6")
var pm = document.createElement("p");
pm.textContent = elem.MSRP;
var ps = document.createElement("p");
ps.textContent = elem.strikedOffPrice;
ps.setAttribute("id" , "ps")
var div7= document.createElement("h3")
div7.textContent = elem.price;
var sdiv8 = document.createElement("div")
sdiv8.setAttribute("id" ,"div8")
var btn2= document.createElement("button")
btn2.setAttribute("id" ,"btn2")
btn2.textContent =elem.quick
sdiv8.append(btn2)
sdiv6.append(pm,ps)
sdiv3.append(ptext)
sdiv4.append(h2);
sdiv2.append(img);
sdiv1.append(sdiv2,sdiv4,sdiv3,sdiv5,sdiv6,div7,sdiv8)
document.querySelector(".smain").append(sdiv1)
})
// sixth part
var ndata = [
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/11290635-2054892767941057.jpg",
prodetails:"SkinCeuticals Triple Lipid Restore 242 (1.6 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★234",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
}, {
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/12902892-1954869141433701.jpg",
prodetails:"Sunday Riley Morning Buzz Brightening Duo - $150 Value",
saleoff:"Sunday Riley Gift ",
star: "★★★★★108",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
},{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/original/11719722-1134871560028310.jpg",
prodetails:"iS Clinical Youth Intensive Creme (1.7 oz.).",
saleoff:"Sunday Riley Gift ",
star: "★★★★★68",
MSRP: "MSRP:",
strikedOffPrice:"$150.00",
price:"$135.00",
quick:"QUICK BUY"
},
{
imgUrl:"https://static.thcdn.com/images/small/webp//productimg/1600/1600/11833559-2544781056254810.jpg",
prodetails:"SENTÉ Dermal Repair Cream (1.7 fl. oz.)",
saleoff:"Sunday Riley Gift ",
star: "★★★★★156",
MSRP: "MSRP:",
strikedOffPrice:"$100.00",
price:"$35.00",
quick:"QUICK BUY"
}
];
ndata.map(function(elem){
var ndiv1 = document.createElement("div");
ndiv1.setAttribute("id", "ndiv1")
var ndiv2 = document.createElement("div")
ndiv2.setAttribute("id" ,"ndiv2");
var ndiv4=document.createElement("div")
ndiv4.setAttribute("id" , "ndiv4")
var img = document.createElement("img")
img.setAttribute("src" , elem.imgUrl)
var ndiv3 = document.createElement("div");
ndiv3.setAttribute("id" , "ndiv3")
var h2 = document.createElement("p")
h2.textContent = elem.prodetails;
var ptext = document.createElement("p")
ptext.textContent = elem.saleoff;
var ndiv5 = document.createElement("div");
ndiv5.setAttribute("id" , "ndiv5")
ndiv5.textContent = elem.star;
var ndiv6 = document.createElement("div");
ndiv6.setAttribute("id" , "ndiv6")
var pm = document.createElement("p");
pm.textContent = elem.MSRP;
var ps = document.createElement("p");
ps.textContent = elem.strikedOffPrice;
ps.setAttribute("id" , "ps")
var div7= document.createElement("h3")
div7.textContent = elem.price;
var ndiv8 = document.createElement("div")
ndiv8.setAttribute("id" ,"ndiv8")
var btn3= document.createElement("button")
btn3.setAttribute("id","btn3")
btn3.textContent =elem.quick
ndiv8.append(btn3)
ndiv6.append(pm,ps)
ndiv3.append(ptext)
ndiv4.append(h2);
ndiv2.append(img);
ndiv1.append(ndiv2,ndiv4,ndiv3,ndiv5,ndiv6,div7,ndiv8)
document.querySelector(".nmain").append(ndiv1)
})