Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!