Made a function for scrolling div to bottom

pull/73/head
jonsowman 2010-05-31 16:40:36 +01:00
rodzic d3ace2f023
commit 2ffc36d4ea
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -222,7 +222,11 @@ function appendDebug(appendage, clear) {
$("#debuginfo").html(""); $("#debuginfo").html("");
} }
// keep the debug window scrolled to bottom // keep the debug window scrolled to bottom
$("#scenario_template").animate({scrollTop: $('#scenario_template')[0].scrollHeight}); scrollToBottom("scenario_template");
}
function scrollToBottom(div_id) {
$("#"+div_id).animate({scrollTop: $("#"+div_id)[0].scrollHeight});
} }
function toggleWindow(window_name, linker, onhide, onshow, force) { function toggleWindow(window_name, linker, onhide, onshow, force) {