min30327 / luxy.js

Inertia scroll and parallax effect plugin in Vanilla.js
596 stars 86 forks source link

Second usage of luxy.init() problem #11

Open walkao opened 5 years ago

walkao commented 5 years ago

Hey, I'm trying to use your cool library in my single page application home project, but I have some problems with smooth scrolling when calling .init() second time when different page with #luxy element loads.

Scroll partially works, it calculates transform, but it stops smoothing effect - whereas parallax works fine so I think there is problem with just an animation of scrolling.

Tried to fix the bug in the code but no success - I'd be grateful for some advices or ideas.

Thanks!

ItayAssouline commented 3 years ago

Having the same problem. help would be appriciated

TechNerdsUzi commented 2 years ago

Try This (window).luxy.init();

Hey, I'm trying to use your cool library in my single page application home project, but I have some problems with smooth scrolling when calling .init() second time when different page with #luxy element loads.

Scroll partially works, it calculates transform, but it stops smoothing effect - whereas parallax works fine so I think there is problem with just an animation of scrolling.

Tried to fix the bug in the code but no success - I'd be grateful for some advices or ideas.

Thanks!