metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.52k stars 605 forks source link

Flickity data-flickity-bg-lazyload + Lazysizes data-bgset #439

Closed raphaelokon closed 8 years ago

raphaelokon commented 8 years ago

Hi.

I would like to combine Flickity's data-flickity-bg-lazyload + Lazysizes data-bgset.

I really like Flickity's declarative way to lazy load its images (eg. lazy load only next-siblings not exponential algorithmic like lazysizes) … but it lacks the responsive features that lazysizes offers. What are your opinions @desandro and @afarkas on combining those.

Flickity API for bgLazyLoad: http://flickity.metafizzy.co/options.html#bglazyload Lazysize bg-set demo: http://jsfiddle.net/trixta/w96o9xm5/

desandro commented 8 years ago

Using lazysizes's bgset with Flickity looks like a good use case to build a solution with their APIs. See lazysizes JS API and Flickity select event

raphaelokon commented 8 years ago

Thanks. I was indeed reading lazysizes JS API to marry those two. I am closing this thread but will keep you guys posted on my progress.

raphaelokon commented 8 years ago

Got it working. Flickity should have a plugin/extension API :D

desandro commented 8 years ago

It does! Take a look at any of the .js files to see how they work. For example lazyload.js

raphaelokon commented 8 years ago

@desandro Cheers.

rzschoch commented 5 years ago

@raphaelokon Do you remember, how you got it working nearly 2 years ago?