For setting a consistent scroll stop point 60px above each section's H2, follow these Webflow-specific steps:
scroll-buffer.
const scrollBuffer = document.querySelector('.scroll-buffer');
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
const offset = scrollBuffer.offsetHeight; // 60px
window.scrollTo({
top: target.offsetTop - offset,
behavior: 'smooth'
});
});
});
To ensure a consistent scroll stop 60px above H2 sections, create a scroll buffer, wrap H2s correctly, and implement custom JavaScript for anchor link adjustment across both "Services" and "Products We Love" sections.