javascript - imagemapster different areas with different colors -
i wondering if following possible imagemapster: need area 1 , area 2. when hover 1 of them both have highlight in different colors, example area 1 blue , green when hover 1 of them , area 2 yellow , red on hover.
this tried far:
<script type="text/javascript"> $(document).ready(function () { $('#landkarte').mapster({ fillopacity:0.5, mapkey: 'data-group', areas : [ {key : 'keyone',fillcolor: 'ff0000',fillopacity : 0.5}, {key : 'keytwo',fillcolor: 'ffff00',fillopacity : 0.5}, }); }); </script>
and html
<area data-group="keyone,keytwo" href="#" coords="117,65,370,89" shape="rect"></area> <area data-group="keyone" href="#" coords="117,65,370,89" shape="rect"></area>
this doesn't work way want. greatful if me out!
best regards,
raph
different colors should no problem. using "imagemapster" need add "data-maphilight" attribute.
data-maphilight='{"strokecolor":"ff0000","strokewidth":5,"fillcolor":"ffffff","fillopacity":0.5}'
<map name="map_dummy" id="map_dummy"> <area shape="poly" coords="226,245,334,335,434,345,454,317,308,194" href="http://www.google.de" alt="object" data-maphilight='{"strokecolor":"ff0000","strokewidth":5,"fillcolor":"ffffff","fillopacity":0.5}'> <area shape="poly" coords="9,566,51,509,171,584,306,582,406,670,386,687,174,689" href="#" alt="subject" data-maphilight='{"strokecolor":"ffff00","strokewidth":5,"fillcolor":"ffffff","fillopacity":0.5}'> </map>
Comments
Post a Comment