maphilight applies to images with a 'usemap' attribute, and outlines the areas defined in their map on mouseover.
It provides a single jQuery function: $.maphilight
This would hilight every image with a map on the page: $('img[usemap]').maphilight()
The simple demo (with awful art, and examples of the metadata plugin)
maphilight( [options] )
: returns jQuery$.maphilight.defaults
maphilight( [options] )
The method that adds hilight behavior to an imagemap.
options
(optional)A set of key/value pairs that configures the map. All options are optional.
The metadata plugin is supported, and all options can be overriden per-img
, or per-area
.
Example: to make one particular hilight green:
<area ... class="{fillColor:'00ff00'}">
$.maphilight.defaults
The defaults for all uses of maphilight can be set here. If you manually replace this, you have to specify all options.
$.fn.maphilight.defaults = {
fill: true,
fillColor: '000000',
fillOpacity: 0.2,
stroke: true,
strokeColor: 'ff0000',
strokeOpacity: 1,
strokeWidth: 1,
fade: true,
alwaysOn: false
}
alwaysOn option. Fixed behavior in Firefox2/Safari/Opera.