Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update index.html #111

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 12 additions & 29 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<div id="nav-text" class="nav_buttons">
<a href="#" class="nav_button">HOME</a>
<a href="#donates" class="nav_button showPopupButton" data-popup-trigger="donate">DONATE</a>
<a href="#donates" class="nav_button">DONATE</a>
<a href="./about.html" class="nav_button">ABOUT US</a>
<a href="#footer" class="nav_button">CONTACT US</a>
</div>
Expand Down Expand Up @@ -248,41 +248,24 @@ <h2 class="quick-links">Quick Links</h2>
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';
}
</script>

</html>