Jay
Jay

Reputation: 2875

Always show scrollbars with iScroll

Is it possible to always show the scroll bar in iScroll

Currently iScroll is working beautifully on a div with overflow:scroll.. however due to the content the user sees there is no way for them to know that there is more in the div

For this reason it would be much better to show the scroll bar on the side showed permanently so that users understood the limits to the content

vScrollbar: true doesn't seem to work

EDIT: This question is specifically to do with using iScroll (http://cubiq.org/iscroll) for touch devices

Upvotes: 2

Views: 7891

Answers (4)

Kuldeep Bhimte
Kuldeep Bhimte

Reputation: 959

For iScroll version 5 please set the below options

var myScroll = new IScroll('#demo', {
    scrollbars: true,
    fadeScrollbars: true
});

Upvotes: 0

Hellodan
Hellodan

Reputation: 1208

If you're still looking for an answer to this, I think what you do is look for this line of code on line 78:

hideScrollbar: isIDevice,

And just comment it out (//) or delete it. That's what I've done and it seems to work fine.

Upvotes: 3

rynkadink
rynkadink

Reputation: 138

Just add hideScrollbar:false to the options list.

Worked just fine for me, using iScroll4.

Cheers

Upvotes: 11

Etienne Carrier
Etienne Carrier

Reputation: 240

Maybe you can have a fixed height to the div that will have a scroll bar and put your content in a div inside this one with a min-height higher than the fixed height of the parent div... that should make the scroll bar always visible.

http://jsfiddle.net/etienne_carre/5gT2U/

Upvotes: 0

Related Questions