jScrollPane scrollbar disappears when applying scrollTo

后端 未结 1 788
后悔当初
后悔当初 2021-01-25 03:34

I have a problem with the jQuery extension jScrollPane combined with the scrollTo plugin. The scrollbar disappears if I apply the scrollTo command to the scrollable

相关标签:
1条回答
  • 2021-01-25 04:13

    If you use jScrollPane, you have to use the functions of jScrollPane to scroll down.

    var delta = 20;
    var element = $('#myContainer').jScrollPane();
    var api = element.data('jsp');
    $('#scroll').click(function() {
        api.scrollByY(delta);
    });​
    

    Try it on jsfiddle

    Refer the jScrollPane Api for a list of functions for the api variable.

    Note: It doesn't work when you omit the p tags around the text.

    0 讨论(0)
提交回复
热议问题