PROYECTOS

  • Todos
  • España
  • Estados Unidos
  • Venezuela
  • Ecuador
document.addEventListener('DOMContentLoaded', function() { const tabs = document.querySelectorAll('.ov-tab-filter'); const galleryItems = document.querySelectorAll('.ov-element-item'); showAllItems(); tabs.forEach(tab => { tab.addEventListener('click', () => { const filter = tab.getAttribute('data-filter'); tabs.forEach(tab => { tab.classList.remove('active'); }); tab.classList.add('active'); galleryItems.forEach(item => { item.style.opacity = 0; item.style.transform = 'translateY(20px)'; setTimeout(() => { if (filter === 'all') { item.style.opacity = 1; item.style.transform = 'translateY(0)'; item.classList.remove('hide'); } else if (item.classList.contains(filter)) { item.style.opacity = 1; item.style.transform = 'translateY(0)'; item.classList.remove('hide'); } else { item.style.opacity = 0; item.style.transform = 'translateY(20px)'; item.classList.add('hide'); } }, 300); }); }); }); function showAllItems() { galleryItems.forEach(item => { item.style.opacity = 1; item.style.transform = 'translateY(0)'; item.classList.remove('hide'); }); } });