waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

Work with https://github.com/idiotWu/smooth-scrollbar

Open adamwright32 opened this issue 7 years ago • 5 comments

smooth-scrollbar generates a scrollable div <div class="scroll-content" style="transform: translate3d(0px, -1693px, 0px);">...

I'm trying to get waypoints working with this, is it possible or do i need to use native scrolling:?

var inview = new Waypoint.Inview({
            element: $('.js-story-slides')[0],
            enter: function(direction) {
                notify('Enter triggered with direction ' + direction);
            },
            entered: function(direction) {
                notify('Entered triggered with direction ' + direction);
            },
            exit: function(direction) {
                notify('Exit triggered with direction ' + direction);
            },
            exited: function(direction) {
                notify('Exited triggered with direction ' + direction);
            }
            },
            {
                //context: $(".scroll-content")
                offset: function() {
                    return this.element.offsetHeight / -3;
                },
                context: $(".scroll-content")[0]
            });

adamwright32 avatar Oct 09 '17 16:10 adamwright32

I have the same question...

pattydiaz avatar Mar 21 '18 19:03 pattydiaz

Probably it is not possibile, because waypoint is based on the scroll position, while smooth scrollbar use the transform property.

lorenzo-gasperoni avatar Apr 14 '18 17:04 lorenzo-gasperoni

You can create your own waypoints adapter, see the documentation about it.

You will be able to listen the smooth-scrollbar scroll event.

AgamlaRage avatar Jan 30 '20 11:01 AgamlaRage

Hey,

did anyone successfully implement Waypoints and smooth scrollbar? Having the same problem and i'd like to fix it.

julssosa avatar Sep 16 '20 07:09 julssosa