Showing
1 changed file
with
3 additions
and
3 deletions
... | @@ -190,19 +190,19 @@ function main() | ... | @@ -190,19 +190,19 @@ function main() |
190 | var newHead = "<div class='message attend'>"; | 190 | var newHead = "<div class='message attend'>"; |
191 | var newTail = "</div>"; | 191 | var newTail = "</div>"; |
192 | var newContent = '[' + data.student_id + '/' + data.student_name + ']' + "출석되었습니다."; | 192 | var newContent = '[' + data.student_id + '/' + data.student_name + ']' + "출석되었습니다."; |
193 | - $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: $('#messages')[0].scrollHeight }, 1000); | 193 | + $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: 0 }, 1000); |
194 | } | 194 | } |
195 | else if (data.status == "already"){ | 195 | else if (data.status == "already"){ |
196 | var newHead = "<div class='message already'>"; | 196 | var newHead = "<div class='message already'>"; |
197 | var newTail = "</div>"; | 197 | var newTail = "</div>"; |
198 | var newContent = '[' + data.student_id + '/' + data.student_name + ']' + "이미 출석되었습니다."; | 198 | var newContent = '[' + data.student_id + '/' + data.student_name + ']' + "이미 출석되었습니다."; |
199 | - $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: $('#messages')[0].scrollHeight }, 1000); | 199 | + $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: 0 }, 1000); |
200 | } | 200 | } |
201 | else if (data.status == "fail"){ | 201 | else if (data.status == "fail"){ |
202 | var newHead = "<div class='message fail'>"; | 202 | var newHead = "<div class='message fail'>"; |
203 | var newTail = "</div>"; | 203 | var newTail = "</div>"; |
204 | var newContent = "인식 실패"; | 204 | var newContent = "인식 실패"; |
205 | - $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: $('#messages')[0].scrollHeight }, 1000); | 205 | + $('#messagebox').prepend(newHead + newContent + newTail).stop().animate({ scrollTop: 0 }, 1000); |
206 | } | 206 | } |
207 | } | 207 | } |
208 | }); | 208 | }); | ... | ... |
-
Please register or login to post a comment