javascript - Html image hotspot switch image -


i have image hotspot on map swops image out on hover keep image open longer , have close (and change original) if users moves cursor outside of new swapped image outline instead of original hotspot, possible?

herewith code far

<div class="mapwrap" style="text-align:center;"><img src="/dev/test/templates/jwd25template/images/map-blank.png" alt="wc" name="map" width="700" height="400" usemap="#mapmap" id="map" border="0" ></div> <map name="mapmap"> <area shape="poly" coords="231,299,236,309,239,314,242,324,242,333,241,340,237,342,232,342,232,346,236,348,239,352,242,359,244,360,246,363,249,371,245,374,243,378,244,379,252,373,253,375,255,378,255,380,260,382,260,381,266,384,269,387,272,389,275,390,276,390,279,390,287,386,288,383,293,381,298,380,303,379,306,379,307,380,310,380,314,378,317,378,320,378,322,376,325,374,330,372,337,370,342,370,347,372,349,372,355,372,358,370,359,369,355,366,352,363,354,358,356,358,354,355,349,354,348,354,342,355,339,352,339,348,341,344,344,339,349,337,352,332,352,327,357,325,362,324,370,323,373,316,372,312,367,309,366,310,360,308,355,311,350,315,346,317,342,315,337,313,331,310,327,307,326,314,325,318,323,322,321,324,314,324,309,327,306,330,304,334,303,335,300,337,297,339,294,341,291,341,288,341,283,339,280,334,280,329,283,325,283,324,277,328,271,331,269,334,269,335,266,327,269,321,266,319,264,317,257,315,257,310,256,302,255,296,255,292,254,286,246,281,239,280,240,285,233,287,231,293,229,296,229,296" href="takke/western-cape" target="_parent" alt="wc" onmouseover="mm_swapimage('map','','/dev/test/templates/jwd25template/images/map-wc-2.png',1)"  onmouseout="mm_swapimgrestore('map','','/dev/test/templates/jwd25template/images/map-blank.png',1)"></map> 

i tried add onmouseout url realise wont work.

trying wrap head around it, ideas appreciated :)

you can css

html code:

<map id="big_map_area">   <area shape="poly" id="map_hover" coords="231,299,2..." href="takke/western-cape" target="_parent" alt="wc"> </map> 

css code:

#map_hover { opacity:0.0; } 

jquery code:

 $("#map_hover").mouseover(function () {      this.css('opacity', '1.0');  });  $("#big_map_area").mouseout(function () {      $("#map_hover").css('opacity', '0.0');  }); 

so show image when mouse enter in small poligon inside tha map, , image swap when leave big map container.

now should work.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -