dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 356 forks source link

Add an option to use only vertical element position to determine its view-ability #103

Open gajus opened 8 years ago

gajus commented 8 years ago

https://github.com/dinbror/blazy/blob/b0cc033a0c968094bf15987368b55231878ae887/blazy.js#L164-L170

The current implementation is checking whether element is in a viewport vertically and horizontally. There are cases (e.g. a carousel) when the intention is to load all elements that are in viewport vertically, disregarding horizontally.

gajus commented 8 years ago

@dinbror Would you like me to raise a PR for this feature?