scroller utils in vanilla js