Search code examples
jquery-jscrollpane

Code to disable vertical scroll bar in jScroll Pane


Have seen that this piece of code could solve my problems but I don't know how or where to apply it to make it work correctly

    JScrollPane.setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_NEVER);

Solution

  • If your aim is to hide the vertical scroll bar then use the following CSS property...

    overflow-y: hidden;
    

    In your CSS (RRD.css), you have...

    .scroll-pane
    {
       width: 100%;
       height: 670px;
       overflow: hidden;
    }
    

    Try changing it to...

    .scroll-pane
    {
       width: 100%;
       height: 670px;
       overflow-y: hidden;
    }
    

    More changes
    And in your includes/jquery.jscrollpane.css change...

    .jspPane
    {
        position: absolute;
        width: 9660px;
    }
    

    to...

    .jspPane
    {
        position: absolute;
        width: 5880px;
    }
    

    This will remove the extended scrolling that is happening. And make sure your content-holder width is 5880px to match the jspPane scrolling ...

    <div id="content-holder"  style="width:5880px;">
    

    The vertical scrollbar will not appear as long the content-holder div width is not less than the width of the content inside it. Think all your images in the content-holder div adds up to 5680px + you need to add the padding you apply as well.