js when scroll to element know code example Example: javascript scroll to element document.getElementById("divId").scrollIntoView();