function scrollTo(elementId) { const element = document.getElementById(elementId); // Get the element by its ID console.log('got element', elementId, element); if (element) { element.scrollIntoView({ block: 'start', inline: 'center', behavior: 'smooth', }); } else { console.error("Error: Element with ID '" + elementId + "' not found."); } }