Message Sent!
Thank you for contacting us. We'll get back to you shortly.
document.addEventListener('DOMContentLoaded', function() {
const menuToggle = document.getElementById('menu-toggle');
const closeMenu = document.getElementById('close-menu');
const mobileMenu = document.getElementById('mobile-menu');
if (menuToggle && mobileMenu) {
menuToggle.addEventListener('click', function() {
mobileMenu.classList.remove('hidden');
document.body.style.overflow = 'hidden';
});
}
if (closeMenu && mobileMenu) {
closeMenu.addEventListener('click', function() {
mobileMenu.classList.add('hidden');
document.body.style.overflow = '';
});
}
if (mobileMenu) {
const menuItems = mobileMenu.querySelectorAll('a');
menuItems.forEach(item => {
item.addEventListener('click', function() {
mobileMenu.classList.add('hidden');
document.body.style.overflow = '';
});
});
}
document.addEventListener('DOMContentLoaded', function() {
const projectCounter = document.getElementById('projectCounter');
const clientCounter = document.getElementById('clientCounter');
const experienceCounter = document.getElementById('experienceCounter');
const animateCounter = (element, target, duration) => {
let start = 0;
const increment = Math.ceil(target / (duration / 16));
const timer = setInterval(() => {
start += increment;
element.textContent = start;
if (start >= target) {
element.textContent = target + '+';
clearInterval(timer);
}
}, 16);
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
animateCounter(projectCounter, 50, 1500);
animateCounter(clientCounter, 45, 1500);
animateCounter(experienceCounter, 8, 1500);
observer.disconnect();
}
});
});
observer.observe(projectCounter);
document.addEventListener('DOMContentLoaded', function() {
const contactForm = document.getElementById('contactForm');
contactForm.addEventListener('submit', function(e) {
e.preventDefault();
window.location.href = "https://api.whatsapp.com/send/?phone=919901223306&text&type=phone_number&app_absent=0";
});
document.addEventListener('DOMContentLoaded', function() {
const links = document.querySelectorAll('a[href^="#"]');
links.forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if (targetId === '#') return;
const targetElement = document.querySelector(targetId);
if (targetElement) {
const navHeight = 60; // Approximate height of the navigation bar
const targetPosition = targetElement.getBoundingClientRect().top + window.pageYOffset - navHeight;
window.scrollTo({
top: targetPosition,
behavior: 'smooth'
});
}
});
});