waypoints
waypoints copied to clipboard
Work with https://github.com/idiotWu/smooth-scrollbar
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]
});
I have the same question...
Probably it is not possibile, because waypoint is based on the scroll position, while smooth scrollbar use the transform property.
You can create your own waypoints adapter, see the documentation about it.
You will be able to listen the smooth-scrollbar scroll event.
Hey,
did anyone successfully implement Waypoints and smooth scrollbar? Having the same problem and i'd like to fix it.