nk-o / jarallax

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

Jarallax Element - destroy method not available? #166

Closed adstr123 closed 4 years ago

adstr123 commented 4 years ago

Are the methods listed in the readme not applicable to instances of Jarallax Element rather than backgrounds?

I want to add the effect when an element is visible (detected with IntersectionObservers) and remove it when it is not visible. For performance reasons.

nk-o commented 4 years ago

Destroy method is working for Elements. If you have a non-working example, please, provide it using https://codepen.io/

adstr123 commented 4 years ago

Hi @nk-o , my apologies. I made a mistake whilst reading the documentation!

I was targeting the incorrect element with the destroy method. I will close this issue.