Spaces:
Sleeping
Sleeping
Update app.py
Browse files95 unmodified lines9697989910010110210310410510610710810910411011111211311 unmodified lines12512612712212812913013113213313413513613713813914014114214314414595 unmodified linespopup_js = """<script> function showPopup(event, name, description, price) { console.log("Popup triggered"); // Debug: Check if this function is called const popup = document.getElementById("custom-popup"); const overlay = document.getElementById("overlay");
if (!popup || !overlay) { console.error("Popup or overlay element not found"); // Debug: Log missing elements return; }
// Get the button's position const rect = event.target.getBoundingClientRect(); const popupX = rect.left + window.scrollX + 10; // Offset for better visibility const popupX = rect.left + window.scrollX + 10; // Add offset for better positioning const popupY = rect.top + window.scrollY + 10;
// Set the popup's position11 unmodified lines </div> `;
// Show the popup and overlay // Display the popup and overlay popup.style.display = "block"; overlay.style.display = "block"; }
function closePopup() { console.log("Popup closed"); // Debug: Check if the close function is called const popup = document.getElementById("custom-popup"); const overlay = document.getElementById("overlay");
if (!popup || !overlay) { console.error("Popup or overlay element not found"); // Debug: Log missing elements return; }
popup.style.display = "none"; overlay.style.display = "none"; }app.py+15-2