views:

25

answers:

2

I cannot for the life of me figure out why the jQuery Tools Tooltips are showing up in the wrong place. Hover over the one of the three gray boxes on this page (e.g. "screen & voice recording"), and the tips should show up on top of the box centered.

http://bit.ly/bdJLEh

+2  A: 

There is an offset property that can be uses to nudge the tooltip to correct position: http://flowplayer.org/tools/tooltip/index.html#positioning. Just scroll up a bit to the table and there it explains the offset property. Just be sure you check the site on multiple browsers, so that you can be sure the offset doesn't need to change.

It looks to me that the offset should be about [0, -150]. Try this:

$(".tooltip").tooltip({
    track: true,
    delay: 0,
    showURL: false,
    showBody: " - ",
    fade: 250,
    offset : [0, -150]
});
SimpleCoder
Thanks SimpleCoder. I updated it with the offset, and it's different on Windows and Mac. Both FF/Safari Mac show it about 150px further to the right, while IE6/7/8/FF/Chrome Windows all show it centered now. It seems like I might need to fix the root problem, because they were once originally aligned but somehow over the course of the project got out of whack. Any ideas?
James Skidmore
You will most likely need to test the site on different browsers, so you can fine-tune the offset for each of them. I'm not sure why the offset is actually needed, but as long as the offset works, I don't see a problem with using it.
SimpleCoder
A: 

On the element style in the source code (checked with Firebug) I found this:

for #recording-tip

element.style 
{
display:none;
    left:371.5px;
opacity:0;
position:absolute;
top:391.2px;
}

This left property is causing it to display in the "wrong" place. I use the same plugin for my tooltips, remove this left property in the style and you should be set :)

Edit: After some more playing around, I found out that this is added by the jQuery itself, but this isn't present in the version I am using, are you using some custom animation or effects?

Kyle Sevenoaks