jarallax icon indicating copy to clipboard operation
jarallax copied to clipboard

Doesn't work with lazysizes when used as background image

Open PubliAlex opened this issue 5 years ago • 1 comments
trafficstars

Issue description:

The github page says that jarallax is compatible with lazysizes, but only when used in tag. When you use lazysizes for background images (so using data-bg attribute), jarallax doesn't work.

Version used:

1.12.0

Code to reproduce the issue (HTML blocks + JavaScript initialization)

<section data-jarallax data-speed="0.2" class="jarallax lazyload" data-bg="image.jpg" style="min-height:700px">
</section>

Best regards,

Alex

PubliAlex avatar Jan 27 '20 13:01 PubliAlex

Hi Alex.

We are using the only img tag with Jarallax. If you have any fix for background images, feel free to make PR https://github.com/nk-o/jarallax/pulls

Regards, nK.

nk-o avatar Jan 29 '20 21:01 nk-o