views:

76

answers:

2

I have image map like this

<map name="imgmap">
<area shape="poly" coords="63,10,64,38,89,37,91,10" href="#" id="x1"></map>

and how can I color that area dynamically with jquery like

("#x1").color('red')

?

+1  A: 

Originally I thought that this might work:

$("#x1").css("background-color", 'red')

However, upon further investigation it become quite clear that there is no easy way to do what you want.
Perhaps, your aim could be achieved by absolute positioning of the special images under your main image and poping them up on $("#x1").hover().

SilentGhost
it does not change anything
dupdup
thx alott for your consideration I am using a highlighting plugin but I have promlems in it too.
dupdup
+1  A: 

you can try using the maphilight plugin of jquery. it does what you want to achieve - http://davidlynch.org/blog/2008/03/maphilight-image-map-mouseover-highlighting/

Amit