JavaScript30 day 13: Slide in on scroll

Ah scroll events. Not great for performance but people seem to like them! Today’s challenge was to animate images into place as the page is scrolled down. There’s a bit of maths based on screen position and image position but with some logging to console it soon makes sense.

One new thing I learnt about was console.count() which can be used to log the number of times an event is fired. Quite useful to demonstrate the importance of debouncing scroll events!

The source is on github and the live version is here.