Closed jamespurnama1 closed 4 years ago
As mentioned in the README you cannot supply the triggerElement a type of string. https://github.com/jonkwheeler/ScrollScene#options
Give it a DOM node.
const domNode = document.querySelector("#trigger");
Also, you cannot toggle multiple elements with the way you have it. You need to supply a single element.
const reveal = document.querySelectorAll(".reveal")[0];
or
const reveal = document.querySelector(".reveal");
Try following the examples given and let me know if it works. https://github.com/jonkwheeler/ScrollScene#toggle-a-classname
Awesome it works now thank you!
is the Invalid value for option "offset": NaN
normal? It didn't appear in older versions of ScrollScene.
Unsure on that bit! I'll have to take a look.
Alright, pull 0.0.20
and it should be gone.
I'm having issues regarding the toggle option
and console is returning this
I'm just using vanilla.js ScrollMagic 2.0.7 and ScrollScene 0.0.18 (
import { ScrollScene } from 'scrollscene'
) Sorry if the solution is obvious as I am a beginner but I did read the README.md thoroughly