Commit fc21859f authored by Markus Bergt's avatar Markus Bergt

added initial scroll

parent 511393ac
......@@ -6,6 +6,8 @@ $(document).ready(function() {
});
}, 1000);
scrollToEnd();
function UseData(data){
var obj = jQuery.parseJSON(data);
if(!!obj.UsersTable)
......@@ -15,12 +17,17 @@ $(document).ready(function() {
if(!!obj.newMessages)
{
$('#chatbody').append(obj.newMessages);
$('html, body').animate({
scrollToEnd();
}
}
function scrollToEnd()
{
$('html, body').animate({
scrollTop: $(document).height()-$(window).height()},
500,
"swing"
);
}
);
}
$('#showRegBtn').click(function(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment