Spaces:
Running
Running
File size: 1,227 Bytes
1df37d7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | document.addEventListener('DOMContentLoaded', function() {
// Add click event to checkboxes
const checkboxes = document.querySelectorAll('input[type="checkbox"]');
checkboxes.forEach(checkbox => {
checkbox.addEventListener('change', function() {
const parentLi = this.closest('li');
if (this.checked) {
parentLi.classList.add('line-through', 'text-gray-400');
} else {
parentLi.classList.remove('line-through', 'text-gray-400');
}
});
});
// Add animation to phase cards on load
const phaseCards = document.querySelectorAll('.bg-white');
phaseCards.forEach((card, index) => {
setTimeout(() => {
card.classList.add('opacity-0');
card.style.animation = `fadeIn 0.5s ease forwards ${index * 0.1}s`;
}, 0);
});
});
// Add animation keyframes to style
const style = document.createElement('style');
style.textContent = `
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
`;
document.head.appendChild(style); |