Closed MarcoTorcolacci closed 3 years ago
Hi @MarcoTorcolacci,
I'm not that familiar with Barba but I'm sure you need to apply the same concept as with any other PJAX navigation. Meaning that you need to update the page that ASScroll is scrolling with the new one that Barba loads in. Like this:
asscroll.enable(false, true, document.querySelector('.new-page'))
With .new-page
being the page element Barba loads in.
Let me know if this helps you.
Hi @ashthornton , moving the Barba div after the asccroll div is better. `
Are you running .enable()
and .disable()
at the correct points during your transition?
Hello Ash, can you give me some tips to make the two live together?
I start to basic example
barba.init({ transitions: [{ name: 'opacity-transition', leave(data) { return gsap.to(data.current.container, { opacity: 0 }); }, enter(data) { return gsap.from(data.next.container, { opacity: 0 }); } }] });
The transition works then after a while the height of the body is set to 0 and everything disappears.
Thanks!!