Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

110
Visualizações
update window scroll position while using scrolltrigger and smoothscrollbar.js on wordpress divi

so i'm using gsap, scrolltrigger and smoothscrollbar.js with divi theme on wordpress.

let bodyScrollBar = Scrollbar.init(document.querySelector('.scroller'), {
  damping: 0.1,
  delegateTo: document,
  alwaysShowTracks: true,
});

ScrollTrigger.scrollerProxy(".scroller", {
  scrollTop(value) {
    if (arguments.length) {
      bodyScrollBar.scrollTop = value;
    }
    return bodyScrollBar.scrollTop;
  },
});

bodyScrollBar.addListener(ScrollTrigger.update);

using above code, i've initialied smoothscrollbar and a fuction that says scrolltrigger to update scroll position as smoothscrollbar scrolls.

But the problem is that, I cannot use any of divi scroll animations as well as any $(window).scroll() or document.addEventListener('scroll', function() ) functions.

Is there any way where I can tell window to update scroll position just like I've told scrolltrigger to update scroll position.

Thanks in advance.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda