Scrolling
This commit is contained in:
parent
7050ecaf56
commit
4b2a0adf29
1 changed files with 6 additions and 12 deletions
|
@ -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('<span style=\"color: #585858;\">Du: '+whispt[2]+'</span><br />');
|
||||
$('#'+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('<span style=\"color: #000000;\">'+whisp[1]+': '+whisp[2]+'</span><br />');
|
||||
$('#'+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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue