Spaces:
Running
Running
haz visible el texto al pulsar en el botón
Browse files
script.js
CHANGED
|
@@ -21,19 +21,19 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 21 |
btn.classList.remove('active-category');
|
| 22 |
btn.classList.add('bg-white', 'text-gray-700');
|
| 23 |
});
|
| 24 |
-
|
| 25 |
// Update clicked button
|
| 26 |
button.classList.remove('bg-white', 'text-gray-700');
|
| 27 |
button.classList.add('active-category');
|
| 28 |
-
// Update category contents
|
| 29 |
document.querySelectorAll('[data-category-content]').forEach(content => {
|
| 30 |
-
content.classList.add('hidden');
|
| 31 |
if (content.getAttribute('data-category-content') === category) {
|
| 32 |
-
content.
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
});
|
| 35 |
-
|
| 36 |
-
feather.replace();
|
| 37 |
}
|
| 38 |
});
|
| 39 |
// Form submission handling
|
|
|
|
| 21 |
btn.classList.remove('active-category');
|
| 22 |
btn.classList.add('bg-white', 'text-gray-700');
|
| 23 |
});
|
|
|
|
| 24 |
// Update clicked button
|
| 25 |
button.classList.remove('bg-white', 'text-gray-700');
|
| 26 |
button.classList.add('active-category');
|
| 27 |
+
// Update category contents with animation
|
| 28 |
document.querySelectorAll('[data-category-content]').forEach(content => {
|
|
|
|
| 29 |
if (content.getAttribute('data-category-content') === category) {
|
| 30 |
+
content.style.display = 'block';
|
| 31 |
+
content.style.animation = 'fadeIn 0.5s ease-out';
|
| 32 |
+
} else {
|
| 33 |
+
content.style.display = 'none';
|
| 34 |
}
|
| 35 |
});
|
| 36 |
+
feather.replace();
|
|
|
|
| 37 |
}
|
| 38 |
});
|
| 39 |
// Form submission handling
|