We help IT Professionals succeed at work.

jscrollpane Track width

dzash2000
dzash2000 used Ask the Experts™
on
Hi - I'm trying to use the very popular "jScrollpane" on my site and cannot figure out how to widen the track where the grab-drag and arrows up/down live.

I've tried "width:30px" in every css statement and can't get it any wider than the demo 8px. I've even replaced the images of the "grab-drag.gif" and the arrows thinking I could force the track to match.  Nothing works.

Can someone tell me the secret of widening the jScrollpaneTrack??

thanks,
d2
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
You can find it in jscrollpane.js file
line 641 (might be different line number in your copy)
change scrollbarWidth value from 10 pixels to your desired value

$.fn.jScrollPane.defaults = {
scrollbarWidth : 10,

hope that helps

Author

Commented:
vukovarcan - thanks for your response.  As a longtime javascript struggler I often ask questions with answers that are obvious to everyone else.  This never diminishes the value of learning the correct answers.

Your answer was perfect.  But also, your answer showed me the way to another solution which is to add the scrollbarWidth in the head of the html of the document.  So thanks to your tip I was able to use this:

<script type="text/javascript">

$(function()
{
      $('.scroll-pane').jScrollPane({scrollbarWidth:25});
});

</script>

Thank you.

Author

Commented:
a solution that is correct and instructive. Double plus.