-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhomepage.js
40 lines (27 loc) · 1.05 KB
/
homepage.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
import { navbar, footer } from "./componants/navbar.js";
document.getElementById("navbar").innerHTML = navbar();
document.getElementById("footer").innerHTML = footer();
// let c1 = document.getElementById("cart");
// c1.addEventListener('onclick', redirect_cart());
// function redirect_cart(){
// window.location.href = 'cart.html';
// }
document.querySelector("#cart").addEventListener('click', () => {
window.location.href = 'cart.html';
})
// document.querySelector("#profile").addEventListener('click', () => {
// window.location.href = 'login.html';
// // console.log('fagh');
// })
document.querySelector('#btn1').addEventListener('click', () => {
window.location.href = 'all fruits.html';
})
document.querySelector('#btn2').addEventListener('click', () => {
window.location.href = 'all veggies.html';
})
document.querySelector('#btn3').addEventListener('click', () => {
window.location.href = 'fresh cut.html';
})
document.querySelector('#btn4').addEventListener('click', () => {
window.location.href = 'gift.html';
})