[jQuery] Image + map area + mouseout event

[jQuery] Image + map area + mouseout event


Hi all,
I've got an image with a map area defined for it. Eg:
<img id="myimage" src="img/myimage.gif" width="260" height="219"
border="0" usemap="#myimage_map"/>
<map name="myimage_map" id="myimage_map">
    <area href="#" alt="foo" shape="polygon" coords="233, 135, 219, ...">
    <area href="#" alt="bar" shape="polygon" coords="13, 125, 319, ...">
...
</map>
I've got a mouseout event binded to the image itself :
$("#myimage").bind("mouseout", function() {
    console.log("Hello")
    doStuff();
});
My problem is that when the cursor is over an area in the image, the
mousout event of the image is called. (probably because of those event
bubbling/capturing I never understoof how to deal with). I tried
event.stopPropagation() and event.preventDefault() without success.
Is there a way to avoid that behaviour ?
--
Fabien Meghazi
Website: http://www.amigrave.com
Email: agr@amigrave.com
IM: amigrave@gmail.com