ImageMapster custom tooltip

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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Where does...
absolute over the selected map area 5 pixels above
...put the tooltip?
In relation to the cursor or the map segment?
RefaelAuthor 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!
TBH I don't remember it, it looks to be getting whatever the position of the map segment is and splitting it, is the page online?

So the tooltip should show just above where the cursor happens to be?
You would need to get the position of the mouseX and mouseY when moving the mouse

Simple example showing how to pass the coordinates when hovering the map (div)

Then use them instead of areaMapPosition[]

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RefaelAuthor Commented:
As always, Gary that's what i was looking for! Thank you so much!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.