-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
36 lines (29 loc) · 1.23 KB
/
Copy pathscript.js
File metadata and controls
36 lines (29 loc) · 1.23 KB
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
document.addEventListener("DOMContentLoaded", () => {
let food1s = document.getElementById("food1");
let food2s = document.getElementById("food2");
let food3s = document.getElementById("food3");
let foods = document.querySelector(".right");
foods.style.backgroundImage = "url('biryani.png.png')";
foods.style.backgroundSize = "cover";
foods.style.backgroundPosition = "center";
food1s.addEventListener("click", () => {
foods.style.backgroundImage = "url('biryani.png.png')";
foods.style.backgroundSize = "cover";
foods.style.backgroundPosition = "center";
});
food2s.addEventListener("click", () => {
foods.style.backgroundImage = "url('cury_with_bread.png')";
foods.style.backgroundSize = "contain";
foods.style.backgroundPosition = "center";
});
food3s.addEventListener("click", () => {
foods.style.backgroundImage = "url('idli.png')";
foods.style.backgroundSize = "contain";
foods.style.backgroundPosition = "center";
});
document.getElementById("feedbackForm").addEventListener("submit", function (e) {
e.preventDefault();
alert("Thank you for your feedback!");
window.location.reload();
});
});