working on making the scrollbar appear in the right place

This commit is contained in:
Micah Lee 2014-06-19 20:47:09 -04:00
parent 5865fd60ea
commit 3e65bf7884
2 changed files with 12 additions and 7 deletions

View file

@ -6,6 +6,7 @@ $(function(){
$('#log').append($line);
// scroll to bottom
set_log_height();
$('#log').scrollTop($('#log').height());
}
@ -115,4 +116,12 @@ $(function(){
});
}
});
// make sure the log always has a height set, so it will have its own scrollbar
function set_log_height() {
var new_height = $(document).height() - 140; // header = 100, footer = 40
$('#log').css('height', new_height);
}
set_log_height();
$.resize(set_log_height);
});