make sticky chat mroe responsive to changes in top bar
This commit is contained in:
parent
8b821d42a2
commit
252be19885
1 changed files with 3 additions and 0 deletions
|
@ -43,9 +43,12 @@ var chat = (function()
|
||||||
$('#chatbox').addClass("stickyChat");
|
$('#chatbox').addClass("stickyChat");
|
||||||
$('#chattext').css({"top":"0px"});
|
$('#chattext').css({"top":"0px"});
|
||||||
$('#editorcontainer').css({"right":"192px"});
|
$('#editorcontainer').css({"right":"192px"});
|
||||||
|
var editorcontainerTop = $('#editorcontainer').offset().top;
|
||||||
|
$('.stickyChat').css("top",editorcontainerTop+"px");
|
||||||
isStuck = true;
|
isStuck = true;
|
||||||
} else { // Unstick it
|
} else { // Unstick it
|
||||||
padcookie.setPref("chatAlwaysVisible", false);
|
padcookie.setPref("chatAlwaysVisible", false);
|
||||||
|
$('.stickyChat').css("top", "auto");
|
||||||
$('#chatbox').removeClass("stickyChat");
|
$('#chatbox').removeClass("stickyChat");
|
||||||
$('#chattext').css({"top":"25px"});
|
$('#chattext').css({"top":"25px"});
|
||||||
$('#editorcontainer').css({"right":"0px"});
|
$('#editorcontainer').css({"right":"0px"});
|
||||||
|
|
Loading…
Reference in a new issue