JezK
Edit File: main.js
// Header scroll effect const header = document.querySelector('header'); window.addEventListener('scroll', () => { if (window.scrollY > 50) { header.classList.add('scrolled'); } else { header.classList.remove('scrolled'); } }); // Smooth scroll for navigation links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); const target = document.querySelector(this.getAttribute('href')); if (target) { target.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }); // Register button click handler document.querySelectorAll('button').forEach(button => { const buttonText = button.querySelector('span')?.textContent.trim(); if (buttonText === 'Register Now') { button.addEventListener('click', () => { window.location.href = 'tel:+919779400128'; }); } }); // Contact button click handler document.querySelectorAll('button').forEach(button => { const buttonText = button.querySelector('span')?.textContent.trim(); if (buttonText === 'Contact Us') { button.addEventListener('click', () => { window.location.href = '#contact'; }); } }); // Add loading animation to buttons document.querySelectorAll('button').forEach(button => { button.addEventListener('click', function() { this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = 'scale(1)'; }, 200); }); }); // Initialize AOS with custom settings document.addEventListener('DOMContentLoaded', () => { AOS.init({ duration: 1000, once: true, offset: 100, easing: 'ease-out' }); });