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 355 forks source link

This is a feature thing: #148

Open rapgithub opened 7 years ago

rapgithub commented 7 years ago

it will be nice to have in blazy the chance to have a loader specified in the options settings and also some css style for the selector and loader:

something like:

var bLazy = new Blazy({ loaderSelector: '.loading' loaderAlignment: 'centered', selectorCSS: [{ -webkit-transition: opacity 500ms ease-in-out; -moz-transition: opacity 500ms ease-in-out; -o-transition: opacity 500ms ease-in-out; transition: opacity 500ms ease-in-out; max-width: 100%; opacity: 0; }], selectorloadedCSS: [{ opacity: 1; }], });

where loaderAlignment can be centered top-centered bottom-centered or custom