I have a horizontal iScroll instance that has an interactive scrollbar.
myScroll = new IScroll('#wrapper', {
scrollX: true,
scrollY: false,
mouseWheel: false,
scrollbars: 'custom',
interactiveScrollbars: true,
resizeScrollbars: false,
bindToWrapper: false,
click: true,
fadeScrollbars: true,
});
I want its scrollbars to hide when iScroll makes the indicator hidden (display: none
)
I noticed that it changes the indicator's css display
property when it detects that scrolling is not needed because of the lack of slides/elements to scroll with.
This usually happens when I resize the browser from small to large viewports.
fadeScrollbars
is not exactly what I wanted because it hides the scrollbar and indicator even if it is still okay to scroll.
How do I configure iScroll to not display the scrollbar if the indicator is hidden?
Is there any work-around for this?