Spaces:
Running
Running
| // Initialize tooltips when icons are loaded | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Search functionality | |
| const searchInput = document.querySelector('input[type="text"]'); | |
| const searchButton = document.querySelector('button'); | |
| searchButton.addEventListener('click', () => { | |
| if (searchInput.value.trim()) { | |
| alert(`Searching for: ${searchInput.value}`); | |
| // In a real app, this would redirect to search results | |
| } | |
| }); | |
| searchInput.addEventListener('keypress', (e) => { | |
| if (e.key === 'Enter' && searchInput.value.trim()) { | |
| alert(`Searching for: ${searchInput.value}`); | |
| // In a real app, this would redirect to search results | |
| } | |
| }); | |
| // Responsive adjustments | |
| function handleResize() { | |
| // Add any responsive JS logic here | |
| } | |
| window.addEventListener('resize', handleResize); | |
| handleResize(); | |
| }); |