Jump to content
Search Community

Scrollable area on a page with ScrollSmoother

Oleh_Rusyi test
Moderator Tag

Recommended Posts

Currently normalizeScroll does not support nested scrollers, but it's something we're investigating. For now you'll just have to disable that feature.

 

ScrollSmoother.create({
            content: "#smooth-content",
            wrapper: "#smooth-wrapper",
            smooth: 1, // how long (in seconds) it takes to "catch up" to the native scroll position
            effects: false, // looks for data-speed and data-lag attributes on elements
            // normalizeScroll: true, // prevents address bar from showing/hiding on most devices, solves various other browser inconsistencies
            smoothTouch: 0,
        })

 

  • Like 1
Link to comment
Share on other sites

  • 10 months later...
  • 5 months later...

Hi @MOQO. ScrollSmoother is specifically built to scroll the entire page, not individual <div> elements. The technique used to accomplish scroll smoothing cannot work in nested things due to browser limitations. It’s definitely more work, but you could use Observer to listen for wheel events (or whatever) and update the scroll position accordingly, in a smooth fashion (using tweens for example). 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...