• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Tooltip Problem

MagnusB

Well-known member
#2
My guess is that the drop downs are all absolutely positioned, while your tool tips are relatively positioned. If I am not mistaken, you will need to absolutely position the tool tips as well.
 
R

ragtek

Guest
#3
it's not "my tooltip" it's the default function from xenforo
Code:
/**
* Wrapper for jQuery Tools Tooltip
*
* @param jQuery .Tooltip
*/
XenForo.Tooltip = function($element)
{
var tipClass = String($element.data('tipClass') || ''),
isFlipped = /(\s|^)flipped(\s|$)/.test(tipClass),
offsetY = parseInt($element.data('offsetY')) || -6,
offsetX = parseInt($element.data('offsetX')) + $element.innerWidth() * (isFlipped ? 1 : -1),
title = XenForo.htmlspecialchars($element.attr('title'));
 
if (!offsetX)
{
setTimeout(function()
{
offsetX = $element.innerWidth() * (isFlipped ? 1 : -1);
 
$element.data('tooltip').getConf().offset = XenForo.switchOffsetRTL([ offsetY, offsetX ]);
}, 500);
}
 
$element.attr('title', title).tooltip(XenForo.configureTooltipRtl(
{
delay: 0,
position: $element.data('position') || 'top ' + (isFlipped ? 'left' : 'right'),
offset: [ offsetY, offsetX ],
tipClass: 'xenTooltip ' + tipClass,
layout: '<div><span class="arrow" /></div>'
}));
};
 

MagnusB

Well-known member
#4
I still think it is a problem with position:absolute vs position:relative, and the js expects the position to be relative. Javascript is usually gibberish to me though.

EDIT:
Trying to reproduce it with developer tools on other items using tool tip, not being able to do so. I am thinking the fact that it corrects it self is a pretty big tip to what is going on, I just can't get it.