dkern / jquery.lazy

A lightweight, fast, feature-rich, powerful and highly configurable delayed content, image and background lazy loading plugin for jQuery & Zepto.
http://jquery.eisbehr.de/lazy
Other
1.02k stars 237 forks source link

Picture tag effects not working #185

Closed St-Permiakov closed 5 years ago

St-Permiakov commented 5 years ago

Hi!

Effects like "fadeIn" won't apply on <picture> lazy load. I suppose it's possible and would try to add it myself when I have spare time, but if anyone gets ahead of me I'd appreciate a lot.

Or maybe I'm just doing something wrong. Can anyone point at my mistake in that case?

Quick demo: https://codepen.io/Stranger92/pen/XyxraQ

P.S.: Great plugin, thanks for your great work!

dkern commented 5 years ago

Hello @St-Permiakov

The picture plugin is an additional extension of Lazy. This plugins doesn't support all features of Lazy itself, like the use of effects. If you want to have a fade-in effect on loading, i would suggest to do this on your own. Like with a opacity css transition. This kind of things are pretty easy to do with callbacks, in this case afterLoad.

https://codepen.io/anon/pen/pQxJMY