Tiffin food

This commit is contained in:
debu-2 2026-10-08 05:19:46 +05:30
parent 5ced0d0812
commit 4697dab339
8 changed files with 431 additions and 0 deletions

18
TheTiffinFood/script.js Normal file
View file

@ -0,0 +1,18 @@
document.querySelectorAll(".meal-card").forEach((card) => {
const openPricing = () => {
window.location.href = `pricing.html?mode=${encodeURIComponent(card.dataset.mode)}`;
};
card.querySelector(".card-action").addEventListener("click", openPricing);
card.addEventListener("click", (event) => {
if (event.target.closest(".card-action")) return;
openPricing();
});
card.addEventListener("keydown", (event) => {
if ((event.key === "Enter" || event.key === " ") && event.target === card) {
event.preventDefault();
openPricing();
}
});
});