diff --git a/script.js b/script.js index 0cc5d8a..ae2410c 100644 --- a/script.js +++ b/script.js @@ -594,20 +594,22 @@ document.addEventListener('DOMContentLoaded', initServiceStatusChecker); * Service Info Modals */ function initServiceModals() { - const privateServices = document.querySelectorAll('.private-service'); + // Only handle services that have data-service attribute (not links to dummy pages) + const privateServices = document.querySelectorAll('.private-service[data-service]'); const modals = document.querySelectorAll('.service-modal'); const closeButtons = document.querySelectorAll('.modal-close'); - // Open modal when clicking private service + // Open modal when clicking private service that has a modal privateServices.forEach(service => { service.addEventListener('click', (e) => { - e.preventDefault(); const serviceName = service.getAttribute('data-service'); const modal = document.getElementById(`modal-${serviceName}`); if (modal) { + e.preventDefault(); modal.classList.add('active'); document.body.style.overflow = 'hidden'; } + // If no modal exists, let the link work normally }); });