document.addEventListener('DOMContentLoaded', function() { // Tab functionality const tabButtons = document.querySelectorAll('.tab-btn'); tabButtons.forEach(button => { button.addEventListener('click', () => { const tabId = button.getAttribute('data-tab'); // Remove active class from all buttons tabButtons.forEach(btn => btn.classList.remove('active')); // Add active class to clicked button button.classList.add('active'); // Hide all tab contents document.querySelectorAll('.tab-content').forEach(content => { content.classList.add('hidden'); }); // Show the selected tab content document.getElementById(tabId).classList.remove('hidden'); }); }); // Simulate loading content for demo purposes setTimeout(() => { const tabContents = document.querySelectorAll('.tab-content'); tabContents.forEach(tab => { tab.innerHTML = `
This is a demo of the ${tab.id} section. In a real application, this would be populated with dynamic content.
`; }); const eventsGrid = document.querySelector('.events-grid'); if (eventsGrid) { eventsGrid.innerHTML = `May 15, 2023 | Computer Lab
May 18, 2023 | Auditorium
Project Lead
Frontend Developer
Backend Developer