Fixing spaces between messages. Now it works great!
This commit is contained in:
@@ -46,9 +46,9 @@ var ChatBoxUI = Class.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
appendMessage: function(message) {
|
appendMessage: function(message) {
|
||||||
this.chatMessagesDiv.append("<p>" + message + "</p>");
|
this.chatMessagesDiv.append("<div class='chatMessage'>" + message + "</div>");
|
||||||
if ($("p", this.chatMessagesDiv).length > 50) {
|
if ($("div", this.chatMessagesDiv).length > 50) {
|
||||||
$("p", this.chatMessagesDiv).first().remove();
|
$("div", this.chatMessagesDiv).first().remove();
|
||||||
}
|
}
|
||||||
this.chatMessagesDiv.prop({ scrollTop: this.chatMessagesDiv.prop("scrollHeight") });
|
this.chatMessagesDiv.prop({ scrollTop: this.chatMessagesDiv.prop("scrollHeight") });
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user