cacert-testmgr/manager/public/js/positionUserInfo.js

18 lines
446 B
JavaScript
Raw Permalink Normal View History

function setUserInfoPos() {
2015-08-09 17:12:51 +00:00
var x = window.innerWidth;
var ui;
x = x - 18; // maybe scroll bar
ui = document.getElementById('userinfo');
if (ui != null) {
ui.style.right = "3px";
// document.getElementById('userinfo').style.bottom = "3px";
ui.style.bottom = 3 - window.pageYOffset + "px";
}
}
window.onload = setUserInfoPos;
window.onresize = setUserInfoPos;
window.onscroll = setUserInfoPos;