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

Sal elements on unsupported browsers are completely invisible #113

Open
b2hinkle opened this issue Oct 16, 2022 · 0 comments
Open

Sal elements on unsupported browsers are completely invisible #113

b2hinkle opened this issue Oct 16, 2022 · 0 comments

Comments

@b2hinkle
Copy link

b2hinkle commented Oct 16, 2022

The expected behavior for unsupported browsers is that I should still be able to see elements which have the data-sal attribute (but they won't animate of course). The reason it's invisible for unsupported browsers is because the start of the animation has an opacity of 0, and the animation never ends up playing since the browser doesn't support IntersectionObserver. I actually fixed the problem in my website by making a wrapper script for SAL, which looks for elements that have the attribute data-sal-wrapper. My js then dynamically adds data-sal attribute to the elements via the update() method of SAL.
image

So the reason why it works now is because I am no longer setting the data-sal attribute at compile time and instead am setting it dynamically.

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