nk-o / jarallax

Parallax scrolling for modern browsers
https://jarallax.nkdev.info
MIT License
1.38k stars 210 forks source link

Image Height Calculation is Off using Data Attribute #221

Open frogydiak opened 1 year ago

frogydiak commented 1 year ago

Issue description:

I was wondering why my images are so blown up and pushing the image position down. After comparing it with the demo page, I got an idea that it might be miscalculating the image size so I thought it is the viewport setting but it is not. Well my jarallax html is not defined after the body tag but deep inside a module with sections and divs. Finally I just thought of initializing it using jQuery and there it is, images are shown properly and the position is working properly.

Version used: 2.1.3

(Did you try using the develop branch from GitHub? There's a chance your issue has already been addressed there) No

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

Just the basic html structure in the readme page and data attributes.

Anyone having this same issue?

nk-o commented 1 year ago

Not sure I understand how you get this problem. Please, provide an example here - https://codesandbox.io/