Bedankt voor je aanvraag!
We nemen binnen 24 uur contact met je op.
`;
form.appendChild(success);
setTimeout(() => {
btn.textContent = original;
btn.disabled = false;
btn.style.background = '';
success.remove();
}, 4500);
});
}
// Smooth offset for fixed nav anchors
document.querySelectorAll('a[href^="#"]').forEach((anchor) => {
anchor.addEventListener('click', (e) => {
const id = anchor.getAttribute('href');
if (id.length > 1) {
const target = document.querySelector(id);
if (target) {
e.preventDefault();
const top = target.getBoundingClientRect().top + window.scrollY - 80;
window.scrollTo({ top, behavior: 'smooth' });
}
}
});
});
});