Highlight Image Map Area Hotspots With jQuery


jQuery code snippet to highlight hotspot areas on an image which is being used as an image map with links references on different areas of the image.


Code and Usage

<script type="text/javascript" src="http://davidlynch.org/js/maphilight/jquery.maphilight.min.js"></script>
<script type="text/javascript">
    $(function () {
        $('.mapHiLight').maphilight({ stroke: false, fillColor: '009DDF', fillOpacity: 1 });

<!-- your image map with ID="mapAreas" and CSS Class="mapHiLight" -->
<ImageMap ID="mapAreas" OnClick="mapAreas_Click" CssClass="mapHiLight" ImageUrl="/images/map.gif" Width="200" Height="200">