Fork me on GitHub

  // update content every second

  setInterval(function(){

    var el = $('<div></div>').html('#' + $('#testDiv').children().length)

            .css({ padding: '3px', border: '1px solid #ccc', margin: '5px' });

    $('#testDiv').append(el);



    // update slimscroll every time content changes

    $('#testDiv').slimscroll();

  }, 1000);



  $('#testDiv').slimscroll({

    alwaysVisible: true,

    height: 150

  });