Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
mNo edit summary
fixed absolute positioning error for tooltip
Line 101: Line 101:
  var _tooltipFrameClassName = 'uniwiki-tooltip-frame';
  var _tooltipFrameClassName = 'uniwiki-tooltip-frame';
  var _activeTooltipIdx = -1;
  var _activeTooltipIdx = -1;
  var _posCorrectionX = 550; var _posCorrectionY = 150;
  var _posCorrectionX = 20; var _posCorrectionY = 10;
function checkElementByClassComp() {
function checkElementByClassComp() {
if (document.getElementsByClassName == undefined) {
if (document.getElementsByClassName == undefined) {
Line 152: Line 152:
var frameObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx);
var frameObj = document.getElementById('tooltipframeidx-' + _activeTooltipIdx);
frameObj.style.left = (x - parentPos.x) + 'px'; //500
frameObj.style.left = ((x - parentPos.x) + _posCorrectionX) + 'px'; //500
frameObj.style.top = (y - parentPos.y) + 'px'; //105
frameObj.style.top = ((y - parentPos.y) + _posCorrectionY) + 'px'; //105
}
}
return false;
return false;