corrade-http-templates
/groupChat/css/style.css |
@@ -5,6 +5,7 @@ |
width: 640px; |
/* height: 120px; */ |
resize: none; |
overflow: hidden; |
border: 1px solid #cccccc; |
-webkit-border-radius: 1px 1px 1px 1px; |
border-radius: 1px 1px 1px 1px; |
/groupChat/groupChat.html |
@@ -42,9 +42,7 @@ |
(function retrieveMessages() { |
$.get("chat.log?t=" + Math.random(), function(data) { |
$("#chat").html(data); |
$("#chat").animate({ |
scrollTop:$("#chat")[0].scrollHeight - $("#chat").height() |
},1000); |
$("#chat").scrollTop($("#chat")[0].scrollHeight); |
setTimeout(retrieveMessages, 1000); |
}); |
}()); |
/instantMessage/css/style.css |
@@ -43,6 +43,7 @@ |
width: 640px; |
/* height: 120px; */ |
resize: none; |
overflow: hidden; |
border: 1px solid #cccccc; |
-webkit-border-radius: 1px 1px 1px 1px; |
border-radius: 1px 1px 1px 1px; |
/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, |