Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jarallax not working with <picture> in Firefox #104

Closed
chesio opened this issue Apr 18, 2018 · 1 comment
Closed

Jarallax not working with <picture> in Firefox #104

chesio opened this issue Apr 18, 2018 · 1 comment

Comments

@chesio
Copy link
Contributor

chesio commented Apr 18, 2018

Issue description:

I have an <img> tag embedded in <picture> element with additional <source>-s for different screen resolutions. In Chrome, the correct <source> is picked up by Jarallax, but in Firefox, the additional <source>-s are ignored.

Version used:

  • Jarallax 1.10.3 installed as Node module
  • Firefox 59.0.2 on Windows

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

Please, see the demo page at: https://www.bluechip-devel.at/jarallax/

Note: To better illustrate the problem, there are two identical <picture>-s on the page. The first one is Jarallaxed, the second one not. On large screen (1024px wide or more) in Firefox, the first image is blurry, while the second one correctly loads larger version of image as provided by <source media="(min-width: 1024px)"> tag.

@chesio
Copy link
Contributor Author

chesio commented Apr 18, 2018

I did some more digging and found out that the jarallax-img class has to be set on <picture> tag, not on <img> tag. I've updated the demo accordingly, now it works in Firefox as well :-)

Maybe it would be worth to add a related example to README?

chesio added a commit to chesio/jarallax that referenced this issue Apr 18, 2018
@nk-o nk-o closed this as completed in #105 Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant