I need to associate a mouse event area with an image
just think of the facebook tag for a second when you roll your face: it shows you the name, right?
Well, I did very similar, but with maps and city names, ok, here we go:
$('img#mapaMundi').bind('mousemove',function(e){ x = getX(); y = getY(); var found = find(x, y); if (found == undefined) { console.log('There is no tagged city for this position'); } else { show(found); } });
And this works great, it shows the desired tag (with animation, etc.), but only when the mouse moves to the area, so if you go to the area and leave the mouse there (since it does not move), it will disappear.
And if I use .bind ('mouseover'), this will not work, because when you move the image to all its edges,
What are you offering?
source share