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
Not applying to content that is hidden #49
Comments
This is the default behavior. The plugin uses the Intersection Observer API to check if the image is visible in the viewport, before proceeding with any calculation to apply the parallax. Thanks to this, even if you have 100 images on the website, only the images visible in the viewport will proceed. This is one of the reasons why simpleParallax is quite fluid :) Try to use the customContainer param as a workaround and let me know. |
Thank you for the additional information. I tried setting customContainer to a common class name that is applied to these images :
But this error is then produced :
Sidenote question : if I switch the system from display:none to visibility:hidden , will the library work in this case? Or is that not relevant. |
Or is there a way to re-apply the simpleParallax on DOM on a click event perhaps? |
You should change your customContainer to “.image-class”. Let me know if that works. |
I assume this is working now. If not let me know. |
I am trying to apply this on images that are in tabbed content where the parent selector is set to display:none until the tab is activated and the content is revealed.
The parallax effect does not seem to be applied to this content that is set to display:none when simpleParallax is executed but display:block when the parent selector is activated.
Is this a known issue? Is there a workaround that would be possible?
The text was updated successfully, but these errors were encountered: