Image maps work completely different from regular links when it comes to positioning the menu (a lot more complicated), so just adding a "rel" attribute to the <area> tag won't work. However, below attached is a modified version of balloontip.js that enables the tooltip to work on rectangular image maps (not other shapes like circle). A sample HTML would look like:
<!--Sample link-->
Code:
<p><map name="FPMap0">
<area href="ccc.com" shape="rect" coords="104, 11, 157, 46" rel="balloon2"></map>
<img border="0" src="file:///C:/bench2/logo.gif" width="315" height="64" usemap="#FPMap0"></p>
<!--Sample corresponding tooltip-->
<div id="balloon2" class="balloonstyle" style="width: 350px; background-color: lightyellow">
Award winning JavaScript tutorials and over 400+ free scripts.
</div>
The only feature missing is that the tooltip when added to image maps won't dynamically adjust itself if too close to the 4 corners of the browser window. I'll have to do that later.
Bookmarks