1

I just included jQuery jScrollPane plugin in to my page and it seems to be working fine except one small issue. I want to decrease the size(height) of scrollBar tab (where we click to drag the scroll bar up and down). I have attached the current snapshot of it as you can see how long it is. On the example site, it shows up fine.

Src: http://jscrollpane.kelvinluck.com/themes/lozenge/

Note: I am talking about the Dark Colored Area on the snapshot.

alt text

2 Answers 2

1

If you want to reduce the size of the "drag" element there are some properties you can pass into the plugin to do so. Please see this example:

http://jscrollpane.kelvinluck.com/drag_size.html

Sign up to request clarification or add additional context in comments.

1 Comment

Good find! Trust me not to look at the instructions :)
0

The height of the dark element is dynamically calculated based on the contents and size of the pane.

Within the jScrollPane js you'd need to adjust the calculation of verticalDragHeight

Search for...

verticalDragHeight = 1 / percentInViewV * verticalTrackHeight;

The trouble is, if you do alter this it could (and probably would) affect the display of the scroll bar under certain circumstances. For example, you wouldn't need a scroll bar if the contents of the pane is smaller than the size of the pane right? Adjusting the verticalDragHeight could effect that determination.


Just in case I misunderstood the question, you are defining the height of your pane right? I.e...

.scroll-pane
{
    height: 200px;
}

3 Comments

Hi Julian, Thanks for the reply. Yes I am defining the height. In my case, the height is 700 px;
You are right, it might affect its use. I thought there might be some easy CSS hack to do this :)
You could extend the height in the javascript by altering the percentInViewV but what'll you notice is the dark coloured part will move outside the confines of the scroll bar either at the top or at the bottom.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.