Is it possible to force jQuery.jScrollPane to always show a vertical scroll-bar?

狂风中的少年 提交于 2019-11-30 10:27:35

Unfortunately this isn't currently possible with jScrollPane. There is an open feature request for it though:

https://github.com/vitch/jScrollPane/issues#issue/8

As a workaround for now you could place an element with a min-height directly inside your scrollpane to force the scrollbar like in this example:

http://www.jsfiddle.net/vitch/5D8sR/

Hope it helps!

another method which I've confirmed will work is to add a new parameter "alwaysShowScroll:true" and make two changes in jquery.jscrollpane.js:

~line 176, change if (!(isScrollableH || isScrollableV)) {
to if (!(isScrollableH || isScrollableV || settings.alwaysShowScroll)) {

~line 241, change if (isScrollableV) {
to if (isScrollableV || settings.alwaysShowScroll) {

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!