corrade-http-templates – Diff between revs 5 and 22

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 5 Rev 22
Line 104... Line 104...
104   104  
105 // Loads all the stored instant messages from the log file named after the avatar. 105 // Loads all the stored instant messages from the log file named after the avatar.
106 function loadInstantMessage(index) { 106 function loadInstantMessage(index) {
107 $.get("messages/" + $("#firstname-" + index).val() + " " + $("#lastname-" + index).val() + ".log" + "?t=" + Math.random(), function(data) { 107 $.get("messages/" + $("#firstname-" + index).val() + " " + $("#lastname-" + index).val() + ".log" + "?t=" + Math.random(), function(data) {
108 $("#chat-" + index).html(data); 108 $("#chat-" + index).html(data);
109 $("#chat-" + index).animate({ 109 // Scroll to the bottom of the conversation.
110 scrollTop: $("#chat-" + index)[0].scrollHeight - $("#chat-" + index).height() -  
111 }, 1000); 110 $("#chat-" + index).scrollTop($("#chat-" + index)[0].scrollHeight);
112 messageIntervals[index] = setTimeout( 111 messageIntervals[index] = setTimeout(
113 loadInstantMessage, 112 loadInstantMessage,
114 1000, 113 1000,
115 index 114 index