check if element is in viewport - vanilla JS. Use by adding a “scroll” event listener to the window and then calling isInViewport().