You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

How to get the tooltips to all display in the same position? Created Oct 28, 2009

This thread is solved

Views: 1433     Replies: 5     Last reply Nov 5, 2009  
You must login first before you can use this feature

C A R

Posts: 4

Registered:
Oct 28, 2009

How to get the tooltips to all display in the same position?

Posted: Oct 28, 2009

Great tooltip script however I'm pulling my hair out over this issue!! Could I please request some guidance :)

Here's what I'm working onhttp://85.92.73.218/~blueprin/_who_we_are.php

See the grey box in the middle. When I hover over the images of other members of staff, I need their profile boxes (i.e. the tooltips), to open in the exact same position as the default one. Currently the tooltips reposition according to the position of the links.

I've spent the best part of two hours trying to fix this, with no success.

Could someone please help me and let me know if there is a possible solution.

Many thanks,

Christian

richardpixel

Posts: 6

Registered:
Nov 3, 2009

» How to get the tooltips to all display in the same position?

Posted: Nov 3, 2009

Reply to: How to get the tooltips to all display in the same position?, from sozodesign
I'm also trying to do this. Has anyone found a solution yet?

YeeHaw1234

Posts: 3

Registered:
Nov 2, 2009

» How to get the tooltips to all display in the same position?

Posted: Nov 3, 2009

Reply to: How to get the tooltips to all display in the same position?, from sozodesign
Is the "offset" parameter not working?

        $("#image1").tooltip({
            tip: '#image1ToolTip',
            offset: [y,x]
        });

y: positive values push the tool tip down, negative, up
X: positive values push the tool tip to the right, negative, to the left.

dries

Posts: 1

Registered:
Nov 4, 2009

» How to get the tooltips to all display in the same position?

Posted: Nov 4, 2009

Reply to: How to get the tooltips to all display in the same position?, from sozodesign
I'm struggling with the same problem.

I've tried the 'relative: false/true' option, but haven't been able to position it properly, but I'm still hoping to fix it with that.

@YeeHaw1234 : the problem with offset is that each 'item' has a different offset. (the fixed position of the tooltip is different relative to each item)

C A R

Posts: 4

Registered:
Oct 28, 2009

» » How to get the tooltips to all display in the same position?

Posted: Nov 4, 2009

Reply to: » How to get the tooltips to all display in the same position?, from dries
Yeh, I've tried playing around with the Offset attraibute but as dries said, this gets messy as the offset is different for each link.

YeeHaw1234

Posts: 3

Registered:
Nov 2, 2009

» How to get the tooltips to all display in the same position?

Posted: Nov 5, 2009

Reply to: How to get the tooltips to all display in the same position?, from sozodesign
Here's another possibility, but it's a little dirty:

Assign all your tool tips to a nearly hidden trigger (say a div of 1px by 1px):


$("#nearlyHiddenTrigger").tooltip({ 
    tip: '#image1ToolTip'
}); 
$("#nearlyHiddenTrigger").tooltip({ 
    tip: '#image2ToolTip'
}); 
etc...

The mouserover() and mouseout() events of your images trigger the tooltips


$("#image1").mouseover(function(){
  var api = $("#nearlyHiddenTrigger").tooltip(0).show();
}).mouseout(function(){
  var api = $("#nearlyHiddenTrigger").tooltip(0).hide();
});

$("#image2").mouseover(function(){
  var api = $("#nearlyHiddenTrigger").tooltip(1).show();
}).mouseout(function(){
  var api = $("#nearlyHiddenTrigger").tooltip(1).hide();
});

The problem, however (and this is a problem I'm having), is how to disable the tooltips when you physically mouse-over and mouse-out of the nearlyHiddenTrigger div? Since it's so small, it's unlikely to happen, but it MIGHT happen.