Ghostgim's picture
so I want a website called complex developers which will offer these services (1. Web designing.
97f71e2 verified
raw
history blame
1.02 kB
// Intersection Observer for animations
document.addEventListener('DOMContentLoaded', () => {
const animateElements = document.querySelectorAll('.animate-on-scroll');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-fade-in');
observer.unobserve(entry.target);
}
});
}, {
threshold: 0.1
});
animateElements.forEach(el => observer.observe(el));
// Feather icons replacement
feather.replace();
});
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Current year for footer
document.getElementById('current-year').textContent = new Date().getFullYear();