MissMolly 0 Newbie Poster

This script uses lazyloading images. However, it only works when you scroll to images that are off screen when the page loads. See here. Youll notice there's a heading first, and as you scroll to the images they begin to load.

http://codepen.io/Chmood/pen/CHlGD/

If you load that script without the heading (take out the h1 and h2 from the html) and reload the script, the script breaks and no more images are loaded after the first.

Anyone know why that is?