From f4de919cf58f40f5092ebdf44cb3ddf347d1173c Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Mon, 12 Sep 2011 21:01:37 +0000 Subject: [PATCH] Fixing spaces between messages. Now it works great! --- gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js index 6d94e2641..ab43a2636 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/chat.js @@ -46,9 +46,9 @@ var ChatBoxUI = Class.extend({ }, appendMessage: function(message) { - this.chatMessagesDiv.append("

" + message + "

"); - if ($("p", this.chatMessagesDiv).length > 50) { - $("p", this.chatMessagesDiv).first().remove(); + this.chatMessagesDiv.append("
" + message + "
"); + if ($("div", this.chatMessagesDiv).length > 50) { + $("div", this.chatMessagesDiv).first().remove(); } this.chatMessagesDiv.prop({ scrollTop: this.chatMessagesDiv.prop("scrollHeight") }); },