bRaNdOn
bRaNdOn

Reputation: 1082

Always show Scrollbar in mcustomscrollbar plugin

I'm currently using mcustomscrollbar which is a jquery free plugin. Is there a possible way that this plug in should always show the scrollbar?

Upvotes: 2

Views: 4557

Answers (2)

Yuval A.
Yuval A.

Reputation: 6089

You might of meant that you want the scroll bar to always be visible, even when the scrollable area's content is less than the viewport part of the container. I reached this question when searching for an answer to this situation.

The answer is to add alwaysShowScrollbar to the configuration object of mCustomScrollbar.

From the documentation:

alwaysShowScrollbar: integer - Always keep scrollbar(s) visible, even when there’s nothing to scroll.

    alwaysShowScrollbar: 0 – disable (default)
    alwaysShowScrollbar: 1 – keep dragger rail visible
    alwaysShowScrollbar: 2 – keep all scrollbar components (dragger, rail, buttons etc.) visible

Upvotes: 2

Felix
Felix

Reputation: 38112

The scroll bar should be visible by default unless you're using autoHideScrollbar: true configuration

Besides that, you can also try using this css:

.mCustomScrollBox>.mCSB_scrollTools {
    opacity: 1 !important;
}

Upvotes: 0

Related Questions