I have change the following in order to works fine. @pablocorezzola I miss two things, one is a scroll bar when chat overflows certain height, and the other one is a separator for show the date if it has changed.
$(document).ready(function() {
$(".mytext").on("keyup", function(e){
if ((e.keyCode || e.which) == 13){
var text = $(this).val();
if (text !== ""){
insertChat("me", text);
$(this).val('');
}
}
});
});
rickmm (1) - 6 years ago - Reply 1
Thank you very much for your contribution. The problem of the scroll is already solved. I also added a button to send a message
pablocorezzola () - 6 years ago - Reply 0