From 7286cac149f6995ab0d6c2dbe9c8e01f9c93cb27 Mon Sep 17 00:00:00 2001
From: Tanisha Bansal <145993687+TanishaBansal101@users.noreply.github.com>
Date: Wed, 9 Oct 2024 12:25:43 +0530
Subject: [PATCH] Update index.html
Remove the data-popup-trigger attribute from the "Donate" button in the navbar. Remove the popup trigger condition in the JavaScript for the Donate button.
---
index.html | 41 ++++++++++++-----------------------------
1 file changed, 12 insertions(+), 29 deletions(-)
diff --git a/index.html b/index.html
index 42fe432..4e058e7 100644
--- a/index.html
+++ b/index.html
@@ -25,7 +25,7 @@
@@ -248,41 +248,24 @@ Quick Links
const closePopupButton = document.querySelector(".closePopupButton");
const popup = document.querySelector(".popup");
const overlay = document.getElementById("overlay");
- // showPopupButton.addEventListener("click", function() {
- // popup.style.display = "block";
- // overlay.style.display = "block";
- // });
- showPopupButtons.forEach(button => {
- button.addEventListener("click", function() {
- // Determine which button was clicked and show the popup accordingly
+
+// Remove the condition for 'donate' to show the popup
+showPopupButtons.forEach(button => {
+ button.addEventListener("click", function() {
+ // Check if the trigger is 'cover-page' or 'navbar' to show the popup
const trigger = button.getAttribute("data-popup-trigger");
- if (trigger === "donate" || trigger === "cover-page" || trigger === "navbar") {
- popup.style.display = "block";
- overlay.style.display = "block";
+ if (trigger === "cover-page" || trigger === "navbar") {
+ popup.style.display = "block";
+ overlay.style.display = "block";
}
- });
});
+});
- closePopupButton.addEventListener("click", function() {
+closePopupButton.addEventListener("click", function() {
popup.style.display = "none";
overlay.style.display = "none";
- });
-
- const close = document.querySelectorAll(".navclose");
- document.getElementById('openMenu').addEventListener('click', function() {
- document.getElementById('menuContainer').style.display = 'flex';
- });
-
- document.getElementById('closeMenu').addEventListener('click', function() {
- document.getElementById('menuContainer').style.display = 'none';
- });
- document.querySelectorAll('.close').addEventListener('click', function() {
- document.getElementById('menuContainer').style.display = 'none';
- });
+});
- function handleClose() {
- document.getElementById('menuContainer').style.display = 'none';
- }