diff --git a/assets/js/main.js b/assets/js/main.js index 3cf79d0..5b9144b 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -62,4 +62,34 @@ document.addEventListener('DOMContentLoaded', () => { // Open page based on hash or default to 'home' const initialPage = window.location.hash.substring(1) || 'home'; openPage(initialPage); + + // Tab functionality for 'Why FinMox' page + const whyTabs = document.querySelectorAll('.why-tab'); + const whyContents = document.querySelectorAll('.why-content'); + + whyTabs.forEach(tab => { + tab.addEventListener('click', () => { + const tabId = tab.dataset.tab; + + // Update tab styles + whyTabs.forEach(t => { + if (t.dataset.tab === tabId) { + t.classList.add('bg-black', 'text-white'); + t.classList.remove('bg-gray-200', 'text-black'); + } else { + t.classList.remove('bg-black', 'text-white'); + t.classList.add('bg-gray-200', 'text-black'); + } + }); + + // Show/hide content + whyContents.forEach(content => { + if (content.id === tabId) { + content.classList.remove('hidden'); + } else { + content.classList.add('hidden'); + } + }); + }); + }); }); \ No newline at end of file diff --git a/index.php b/index.php index 897c3c2..a0564b2 100644 --- a/index.php +++ b/index.php @@ -275,7 +275,174 @@ - + + +