Search code examples
jqueryjquery-pluginsjscrollpanejquery-jscrollpane

How to disable vertical scrolling for jScrollPane?


I'm using the jQuery plugin jScrollPane. I want to disable vertical scrolling for the scrollpanes I set.

How can I do that?

I've checked their website, but they don't have an official API page.


Solution

  • They may not have an official api page, but they do have examples that can help. For example, the following page contains a solution to this question: http://jscrollpane.kelvinluck.com/arrows.html

    Page javascript

    $(function()
    {
        $('.scroll-pane').jScrollPane({showArrows: true});
    });
    

    Page CSS

    /* Styles specific to this particular page */
    .scroll-pane
    {
        width: 100%;
        height: 200px;
        overflow: auto;
    }
    .horizontal-only
    {
        height: auto;
        max-height: 200px;
    }
    

    This appears to explain how to accomplish your goals here.