We help IT Professionals succeed at work.

ImageMapster custom tooltip

Refael
Refael asked
on
1,093 Views
Last Modified: 2014-11-17
Hello Experts,

For those who are familiar with ImageMapster .........

The below is my current script that basically position the mouse-over tooltip at the center of the selected map area.
Now i facing a new requirement to position the tooltip absolute over the selected map area 5 pixels above (like every normal tooltip works). I was trying editing the current positioning but no luck getting it to work.

Any help form someone who understand this script below would be very much appreciated.

var areaMapPosition = $(areaMapId).attr('coords').split(',');

$("#tooltip").css({top:areaMapPosition[1]+"px",left:areaMapPosition[0]+"px", "line-height": areaMapPosition[3]-areaMapPosition[1]+4+"px" }).html(text).width(areaMapPosition[2]-areaMapPosition[0]+"px").height(areaMapPosition[3]-areaMapPosition[1]+"px").show();

Open in new window

Comment
Watch Question

CERTIFIED EXPERT
Expert of the Year 2014
Top Expert 2014

Commented:
Where does...
absolute over the selected map area 5 pixels above
...put the tooltip?
In relation to the cursor or the map segment?

Author

Commented:
Hi Gary. Thank you for you comment.

Currently the script above position the tooltip in the center of each map area.
The relation is to the each map area  (not the cursor).

I do not understand how the second line i posted above that deals with the position of the tooltip. Currently the tooltip is positioned in the center of each map area now i need to position it so above it. If you can explain the positioning in the second line i posted above (it was your solution last year) I might be able to do that alone :-)

Thank you again!
CERTIFIED EXPERT
Expert of the Year 2014
Top Expert 2014
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
As always, Gary that's what i was looking for! Thank you so much!