-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Would it be possible to disable automatic highlight events upon mouseover/mouseout events?
I have a imagemap with small textboxes to add some additional information (kind of like tooltips, but sticky). In code:
<map name="demo_map" id="demo_map">
<div id="area1">
<area name="area1" shape="circle" coords="40,40,30" href="#" alt="red circle" />
<area name="area1" shape="rect" coords="60,10,140,40" href="#" alt="blue square" />
<div name="area1" id="text">Hello!</div>
</div>
</map>
Ideally, I like the area and div to behave as if it was one area. This is similar to a areagroup with a boundList. Unfortunately, the items in an boundList do not automatically highlight or select. This needs to be programmed.
See for example http://jsfiddle.net/macfreek/SLa95/1/
Unfortunately, there is a rather annoying 'flickering' when moving the cursor between div and area. This is caused by a mouseout from one element and a subsequent mouseover from the other element. This is particular visible if the highlight fade is set to a high value (in the above example 0.5 sec).
The common solution is to group the elements, and use mouseenter/mouseleave instead of mouseover/mouseout.
See for example http://jsfiddle.net/macfreek/SLa95/2/
Unfortunately, while the mouseenter/mouseleave take care of everything, ImageMapster still fires redundant mapster('highlight', null) events, causing un-highlighting when moving the mouse from an area to a div.
Would it be possible to disable automatic highlights (from mouseover/mouseout events), and so everything manually?