I have this image on html/php page dimensions 500x500 pixels. Now I want that its portions are sliced and when user bring his mouse over the image at different portions of image different message shall be displayed..
Lets say that image is sliced in 20 parts or I pick up starting and ending coordinates for each slice.. How can I make some sore of js code so that on same image there are different areas where different messages (tooltip) are displayed..
Guys any help??
I thought of programming using map, area and coordinates methods.. But no luck finishing it..
Hi Is this What You looking For :
The Jquery Version:
this code will get the mouse co-ordinate relative to image after hovering the image and then will check if co-ordinates are of certain area are hovered ? and will give you the alert message if they are hovered.
Hope this'll be useful.
There are several ways:
Use
map
andarea
tags see its description it was maked for that thingUse svg
But i think first solution is best for you