jQuery-slimScroll icon indicating copy to clipboard operation
jQuery-slimScroll copied to clipboard

How to automatically scroll down

Open firstsko opened this issue 10 years ago • 2 comments

I use setInterval and waiting ajax response.

setInterval(function(){
var timestamp = (new Date()).valueOf();
$.getJSON("/panel/update_log_list/timestamp/"+timestamp, function(json){
    $('#noty_bottom_layout_container').remove();
    $.each(json, function(key, value) {   
    $('#dashboard_log_list').append(
        "<li><span class=\"green\">["+value.timestamp+"]</span>"+
        "<span style=\"color:#305f9c\">["+value.program+"]</span>"+
            "<span style=\"color:#333333\">["+value.host[1]+"]</span>["+
        value.syslog_severity+"]["+value.message+"]</li>"
        );
    });
    $('.sscroll').slimscroll({
    start: 'bottom',
    });
    });

}, 1000);

when append

  • ,the scroll always stay in the same place,how to automatically scroll down?

    firstsko avatar Jan 19 '14 14:01 firstsko