corrade-http-templates
/instantMessage/instantMessage.html |
@@ -106,9 +106,8 @@ |
function loadInstantMessage(index) { |
$.get("messages/" + $("#firstname-" + index).val() + " " + $("#lastname-" + index).val() + ".log" + "?t=" + Math.random(), function(data) { |
$("#chat-" + index).html(data); |
$("#chat-" + index).animate({ |
scrollTop: $("#chat-" + index)[0].scrollHeight - $("#chat-" + index).height() |
}, 1000); |
// Scroll to the bottom of the conversation. |
$("#chat-" + index).scrollTop($("#chat-" + index)[0].scrollHeight); |
messageIntervals[index] = setTimeout( |
loadInstantMessage, |
1000, |