-
Notifications
You must be signed in to change notification settings - Fork 2
/
ayurveda.js
622 lines (583 loc) · 19.9 KB
/
ayurveda.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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
// product data store in arr of object bellow
var productData = [
{
img: "https://static.oxinis.com/healthmug/image/product/5317-2-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "40",
actualprice: "110",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/132288-1-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "40",
actualprice: "110",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/134473-1-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "40",
actualprice: "110",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/130156-2-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "40",
actualprice: "110",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/132288-1-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "50",
actualprice: "110",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/140397-1-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
discount: "30",
actualprice: "110",
cat: "Bhasma & Pishti",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5876-2-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5876-2-200.jpg",
nam: "Baidyanath Bhringrajasava (450ml)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/103791-1-200.jpg",
nam: "Baidyanath (Nagpur) Mahamanjisthadi Kadha (450ml)",
detail:
"Useful in skin diseases, acne and pimples, inflammation, redness and skin rashes.",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "90",
discount: "40",
actualprice: "110",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5718-2-200.jpg",
nam: "Dabur Triphala Tablets (60tab)",
detail:
"Ayurvedic powdered formulation for a healthy gut, overall well being etc",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "50",
discount: "40",
actualprice: "66",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/128831-1-200.jpg",
nam: "Dabur Arjun Chhal Churna (100g)",
detail:
"It helps in keeping the heart muscles healthy and strong and may give relief from excessive thirst",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "53",
discount: "40",
actualprice: "200",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/11740-1-200.jpg",
nam: "Unjha Arogyavardhini Rasa (40tab)",
detail:
"Fatty Liver, Jaundice, Hepatitis, Cirrhosis, Constipation, Indigestion, Skin Disorders",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "53",
discount: "40",
actualprice: "200",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5952-2-200.jpg",
nam: "Baidyanath Brahmi Vati (Buddhi Vardhak) (80tab)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star-half-alt",
s3: "far fa-star",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/149499-1-200.jpg",
nam: "B Tex White Ointment (14g, Pack of 3)",
detail:
"Useful in various skin conditions such as eczema, itching, ringworm, pimples and similar bacterial skin infections.",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/60559-1-200.jpg",
nam: "Dabur Erand Tail (Castor Oil) (100ml)",
detail:
"Erand taila(oil) or castor oil is very good for skin, hair and treating chronic constipation",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/3123-1-200.jpg",
nam: "Himalaya Cystone Tablet (60tab)",
detail:
"Expels Renal Calculi, Control High Uric Acid, Urinary Track Infection (UTI)",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5718-2-200.jpg",
nam: "Dabur Triphala Tablets (60tab)",
detail:
"Ayurvedic powdered formulation for a healthy gut, overall well being etc",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "50",
discount: "40",
actualprice: "66",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/3139-1-200.jpg",
nam: "Dabur Arjun Chhal Churna (100g)",
detail:
"It helps in keeping the heart muscles healthy and strong and may give relief from excessive thirst",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "49",
discount: "40",
actualprice: "233",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/11740-1-200.jpg",
nam: "Unjha Arogyavardhini Rasa (40tab)",
detail:
"Fatty Liver, Jaundice, Hepatitis, Cirrhosis, Constipation, Indigestion, Skin Disorders",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "36",
discount: "40",
actualprice: "100",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/128849-1-200.jpg",
nam: "Tara Pharmaceuticals Double Power Capsules For Men (10caps)",
detail:
"Useful in seasonal cold and viral flu, reduces bloating and helps in digestive process",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "90",
actualprice: "100",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star-half-alt",
s3: "far fa-star",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/64769-1-200.jpg",
nam: "B Tex White Ointment (14g, Pack of 3)",
detail:
"Useful in various skin conditions such as eczema, itching, ringworm, pimples and similar bacterial skin infections.",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "69",
actualprice: "100",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5776-2-200.jpg",
nam: "Organic India LKC (Liver-Kidney Care) Capsules (60caps)",
detail:
"Fatty Liver, Jaundice, Renal Failure, Urinary Tract Infection, Renal Calculi",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "455",
actualprice: "500",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star-half-alt",
s3: "far fa-star",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5776-2-200.jpg",
nam: "Baidyanath Roupya Bhasma (2.5g)",
detail:
"Used in high blood sugar levels , skin disorders ",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "222",
actualprice: "380",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/5979-2-200.jpg",
nam: "Baidyanath Raj Gandhak Vati (60tab)",
detail:
"Erand taila(oil) or castor oil is very good for skin, hair and treating chronic constipation",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "63",
actualprice: "100",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/60934-1-200.jpg",
nam: "Himalaya Cystone Tablet (60tab)",
detail:
"Gastritis, Indigestion, Hyperacidity, Pain in Stomach, Diarrhea, Colitis",
logo: " https://static.oxinis.com/healthmug/image/asset/498-rm-150.png",
price: "99",
actualprice: "100",
cat: "Ras & Sindur",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star",
s4: "fas fa-star-half-alt",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/60934-1-200.jpg",
nam: "Dabur Triphala Tablets (60tab)",
detail:
"Ayurvedic powdered formulation for a healthy gut, overall well being etc",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "50",
discount: "40",
actualprice: "66",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/152508-1-200.jpg",
nam: "Dabur Triphala Tablets (60tab)",
detail:
"Ayurvedic powdered formulation for a healthy gut, overall well being etc",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "50",
discount: "40",
actualprice: "66",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
{
img: "https://static.oxinis.com/healthmug/image/product/60934-1-200.jpg",
nam: "Dabur Triphala Tablets (60tab)",
detail:
"Ayurvedic powdered formulation for a healthy gut, overall well being etc",
logo: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTKhsLXBmJvoDmYBorqmDgfjZs-y4Mn5xNGyg&usqp=CAU",
price: "50",
discount: "40",
actualprice: "66",
cat: "medicine",
s1: "fas fa-star",
s2: "fas fa-star",
s3: "fas fa-star-half-alt",
s4: "far fa-star",
s5: "far fa-star",
},
];
// map productData and append in to div bellow
function display(productData) {
document.querySelector(".items").textContent = "";
productData.map(function (ele, index) {
var mainD = document.createElement("div");
mainD.setAttribute("class", "itm"); //main div for item img and details
var d1 = document.createElement("div"); //img
var img = document.createElement("img");
img.setAttribute("src", ele.img);
d1.append(img);
var d2 = document.createElement("div");
var name = document.createElement("p");
name.setAttribute("id", "iname"); //name of product
name.textContent = ele.nam;
var detail = document.createElement("p");
detail.textContent = ele.detail;
d2.prepend(name, detail);
var d3 = document.createElement("div"); // img for review stras img (still ppending)
var stardiv1 = document.createElement("i");
var stardiv2 = document.createElement("i");
var stardiv3 = document.createElement("i");
var stardiv4 = document.createElement("i");
var stardiv5 = document.createElement("i");
stardiv1.setAttribute("class", ele.s1);
stardiv2.setAttribute("class", ele.s2);
stardiv3.setAttribute("class", ele.s3);
stardiv4.setAttribute("class", ele.s4);
stardiv5.setAttribute("class", ele.s5);
d3.append(stardiv1, stardiv2, stardiv3, stardiv4, stardiv5);
var d4 = document.createElement("div");
var logo = document.createElement("img");
logo.setAttribute("src", ele.logo);
logo.setAttribute("src", ele.logo);
d4.append(logo);
var d5 = document.createElement("div");
var price = document.createElement("p");
price.setAttribute("id", "price");
price.textContent = ele.price;
var rupeeLogo = document.createElement("span");
rupeeLogo.textContent = "₹";
rupeeLogo.style.fontSize = "20px";
var rupeeLogo1 = document.createElement("span");
rupeeLogo1.textContent = "₹";
rupeeLogo1.style.fontSize = "20px";
rupeeLogo1.style.color = "#b7b7b7";
var actualPrice = document.createElement("span");
actualPrice.textContent = ele.actualprice;
actualPrice.style.fontSize = "20px";
actualPrice.style.color = "#b7b7b7";
actualPrice.style.marginRight = "15px";
actualPrice.style.textDecoration = "line-through";
d5.append(rupeeLogo1, actualPrice, rupeeLogo, price);
var d6 = document.createElement("div"); // add to cart logo
var cartLogo = document.createElement("i");
cartLogo.setAttribute("class", "fas fa-cart-plus");
cartLogo.style.fontSize = "20px";
d6.append(cartLogo);
mainD.append(d1, d2, d3, d4, d5, d6);
document.querySelector(".items").append(mainD);
});
// var numberofitem = document.createElement("div");
// numberofitem.textContent = productData.length;
// console.log(numberofitem);
// document.querySelector(".products>div:nth-child(4)>div:nth-child(1)").append(numberofitem)
}
// document.querySelector(".products>div:nth-child(4)>div:nth-child(1)").textContent= "";
display(productData);
//sorting bellow
// sort by name
document.querySelector(".sbyName").addEventListener("click", sortbyname);
function sortbyname() {
productData.sort(function (a, b) {
if (a.nam > b.nam) return -1;
if (a.nam < b.nam) return -1;
return 0;
});
display(productData);
// console.log(productData)
}
// sort by price --1
document.querySelector(".LtoH").addEventListener("click", sortbyLtoH);
function sortbyLtoH() {
productData.sort(function (a, b) {
return Number(a.price) - Number(b.price);
});
display(productData);
// console.log(productData)
}
// sort by price --2
document.querySelector(".HtoL").addEventListener("click", sortbyHtoL);
function sortbyHtoL() {
productData.sort(function (a, b) {
return Number(b.price) - Number(a.price);
});
display(productData);
// console.log(productData)
}
document.querySelector(".bayurveda1").addEventListener("click", filterby1);
function filterby1() {
var filtitem = productData.filter(function (ele) {
return ele.cat == "medicine";
});
console.log(filtitem);
display(filtitem);
}
document.querySelector(".bayurveda2").addEventListener("click", filterby2);
function filterby2() {
var filtitem = productData.filter(function (ele) {
return ele.cat == "Ras & Sindur";
});
console.log(filtitem);
display(filtitem);
}
document.querySelector(".bayurveda3").addEventListener("click", filterby3);
function filterby3() {
var filtitem = productData.filter(function (ele) {
return ele.cat == "Bhasma & Pishti";
});
console.log(filtitem);
display(filtitem);
}
document.querySelector(".bayurveda4").addEventListener("click", filterby4);
function filterby4() {
var filtitem = productData.filter(function (ele) {
return ele.cat == "Vati Gutika & Guggulu";
});
// console.log(filtitem);
display(filtitem);
}
//by price filter
//bellow 200
document.querySelector(".b200").addEventListener("click", filtby200);
function filtby200(){
var filtbyprice = productData.filter(function(ele){
return Number(ele.price)<= 100;
});
console.log(filtbyprice)
display(filtbyprice)
}
//bellow 500 and abow 200
document.querySelector(".b500").addEventListener("click", filtby500);
function filtby500(){
var filtbyprice = productData.filter(function(ele){
return Number(ele.price)<= 500 && Number(ele.price)>= 201;
});
console.log(filtbyprice)
display(filtbyprice)
}
document.querySelector("#return").addEventListener("click", function () {
window.location.href = "index.html";
});