I have seen many websites introduce a nice feature when you're scrolling down the website and suddenly during a certain part of the website scroll, lets say during 40% to 70% of the screen full page an image will appear from either left or right side and sit in the middle of the screen until the user will scroll up/down far enough to which the image will slide outwards.
How could I implement such a feature?