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

Scroll.on is not a function #526

Open
Gagan-deepp opened this issue Nov 4, 2023 · 2 comments
Open

Scroll.on is not a function #526

Gagan-deepp opened this issue Nov 4, 2023 · 2 comments

Comments

@Gagan-deepp
Copy link

heyy i am trying to implement loco scroll and gsap scrolltrigger .Can anyone help me in this why I am getting the error lcoscroll.on isnot a dunction.

here is my code:

const locoScroll = new LocomotiveScroll({
       el: document.querySelector('.main'),
       smooth: true,
   });

   locoScroll.on("scroll", ScrollTrigger.update());
@GanatraJay2000
Copy link

Hi @Gagan-deepp, did you find a solution?

@jwinr
Copy link

jwinr commented Sep 15, 2024

Need more context here. Doesn't seem to be an issue with locomotive scroll. Initializing it as locoScroll and calling locoScroll.on("scroll", locoScroll.update()); doesn't produce any errors.

Works with the following versions:
locomotive-scroll: 4.1.4
next: 14.2.10
react: 18

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

3 participants