ganlanyuan / tiny-slider

Vanilla javascript slider for all purposes.
MIT License
5.26k stars 785 forks source link

Lazyload background images #459

Open yordanzhelevdev opened 5 years ago

yordanzhelevdev commented 5 years ago

Is there a way to lazyload background images?

erlendvo commented 5 years ago

Is there a way to lazyload background images?

Did you find a solution to this?

yordanzhelevdev commented 5 years ago

Is there a way to lazyload background images?

Did you find a solution to this?

No. I just used img tag

erlendvo commented 5 years ago

Is there a way to lazyload background images?

Did you find a solution to this?

No. I just used img tag

all rite, for whatever its worth, i did solve it by changing the tiny.js to add style to a div tag instead of adding a src attribute to the img tag in the dolazyload function

Shlomo-Felsenstein commented 4 years ago

all rite, for whatever its worth, i did solve it by changing the tiny.js to add style to a div tag instead of adding a src attribute to the img tag in the dolazyload function

Hi erlendvo, I have the same issue with using lazyload for background images. I found the doLazyLoad function in tiny-slider.js, but for me it’s not clear how to make the change you have mentioned. Do you mind posting the tweaked code? Thank you!

yordanzhelevdev commented 4 years ago

This can be added as a feature in the next versions.

nicmare commented 4 years ago

i need lazyloading for background images too!

ThinkWired commented 4 years ago

+1

dantahoua commented 3 years ago

+1

al-catraz commented 3 years ago

+1

lucievr commented 3 years ago

+1

dijkermans commented 2 years ago

+1