jScrollPane滚动条

官方网站:http://jscrollpane.kelvinluck.com/

demo:http://jscrollpane.kelvinluck.com/auto_reinitialise.html


scrollToBottom方法滚动到底部

$(function(){

    var settings = {

        showArrows: true,

        autoReinitialise: true

    };

    var pane = $('.scroll-pane')

    pane.jScrollPane(settings);

    var api = pane.data('jsp');

    var contentPane = api.getContentPane();

    var i = 1;



    setInterval(

        function()

        {

            contentPane.append(

                $('<p />').text('This is paragraph number ' + i++)

                );

            api.reinitialise();  

            api.scrollToBottom(); 

        },

        1000

        );

});  

 

你可能感兴趣的:(scroll)