diff --git a/modules/chat/chat.output.php b/modules/chat/chat.output.php index ef9e025..61b1a66 100644 --- a/modules/chat/chat.output.php +++ b/modules/chat/chat.output.php @@ -594,8 +594,7 @@ function inmeta2(){ $('#chatlog').append('Error! Please check your browsers console for the error message.'); window.onbeforeunload = null; if(as!=false){ - var target = $('#chatlog'); - target.animate({ scrollTop: target.scrollHeight}, 500 ); + $('#chatlog').scrollTop($('#chatlog').prop('scrollHeight')); } } socket.onclose = function(){ @@ -603,8 +602,7 @@ function inmeta2(){ $('#chatlog').append('Disconnected!'); window.onbeforeunload = null; if(as!=false){ - var target = $('#chatlog'); - target.animate({ scrollTop: target.scrollHeight}, 500 ); + $('#chatlog').scrollTop($('#chatlog').prop('scrollHeight')); } } @@ -612,8 +610,7 @@ function inmeta2(){ $('#chatlog').append('Disconnected with error: '+exception+'!'); window.onbeforeunload = null; if(as!=false){ - var target = $('#chatlog'); - target.animate({ scrollTop: target.scrollHeight}, 500 ); + $('#chatlog').scrollTop($('#chatlog').prop('scrollHeight')); } console.log(exception); } @@ -813,8 +810,7 @@ function inmeta2(){ $('#'+whispt[1]+'_whisper_text').append('Du: '+whispt[2]+'
'); $('#'+whispt[1]+'_whisper').dialog('open'); $('#'+whispt[1]+'_whisper').dialog('moveToTop'); - var wtarget = $('#'+whisp[1]+'_whisper_text'); - $('#'+whisp[1]+'_whisper_text').animate({ scrollTop: wtarget.scrollHeight}, 500 ); + $('#'+whisp[1]+'_whisper_text').scrollTop($('#'+whisp[1]+'_whisper_text').prop('scrollHeight')); }else{ create_whisper(whispt[1],whispt[2],true); } @@ -825,8 +821,7 @@ function inmeta2(){ $('#'+whisp[1]+'_whisper_text').append(''+whisp[1]+': '+whisp[2]+'
'); $('#'+whisp[1]+'_whisper').dialog('open'); $('#'+whisp[1]+'_whisper').dialog('moveToTop'); - var wtarget = $('#'+whisp[1]+'_whisper_text'); - $('#'+whisp[1]+'_whisper_text').animate({ scrollTop: wtarget.scrollHeight}, 500 ); + $('#'+whisp[1]+'_whisper_text').scrollTop($('#'+whisp[1]+'_whisper_text').prop('scrollHeight')); }else{ create_whisper(whisp[1],whisp[2]); } @@ -842,8 +837,7 @@ function inmeta2(){ } $('#chatlog').append(msg); if(as!=false){ - var target = $('#chatlog'); - target.animate({ scrollTop: target.scrollHeight}, 500 ); + $('#chatlog').scrollTop($('#chatlog').prop('scrollHeight')); } }//End message()