samples/video_conferencing/js/messages.js
function showMessage(userId, msg, attachmentFileId) {
    var userLogin = getUserLoginById(userId);
    var messageHtml = buildMessageHTML(msg.body, userLogin, new Date(), attachmentFileId, msg.id);

    $('#messages-list').append(messageHtml);

    // scroll to bottom
    var mydiv = $('#messages-list');
    mydiv.scrollTop(mydiv.prop('scrollHeight'));
}
function showMessage(userId, msg, attachmentFileId) {
    var userLogin = getUserLoginById(userId);
    var messageHtml = buildMessageHTML(msg.body, userLogin, new Date(), attachmentFileId, msg.id);

    $('#messages-list').append(messageHtml);

    // scroll to bottom
    var mydiv = $('#messages-list');
    mydiv.scrollTop(mydiv.prop('scrollHeight'));
}
function showMessage ( userId , msg , attachmentFileId ) { var userLogin = getUserLoginById ( userId ) ; var messageHtml = buildMessageHTML ( msg . body , userLogin , new Date ( ) , attachmentFileId , msg . id ) ; $ ( '#messages-list' ) . append ( messageHtml ) ; // scroll to bottom var mydiv = $ ( '#messages-list' ) ; mydiv . scrollTop ( mydiv . prop ( 'scrollHeight' ) ) ; }
show messages in UI
show messages in UI