tvler / lazy-progressive-enhancement

A lazy image loader designed to enforce progressive enhancement and valid HTML.
http://tylerdeitz.co/lazy-progressive-enhancement/
MIT License
190 stars 10 forks source link

Remade functionality on scroll + some more edits #16

Closed souljorje closed 4 years ago

souljorje commented 6 years ago

Hi! I found your function useful and decided to improve it. I was a little bit surpised that all functions run by interval, and asked myself: "why not on scroll?". So I remade it. I addition i wrote jQuery's "ready" function in vanilla. Minified file changed too. Hope you'll find my work helpful!

Here you may check it (don't pay attention to rest edits): https://jsfiddle.net/jorje/xz86s7ub/1/