Basically I need this:
http://plugins.jquery.com/project/maphilight
…but instead of just having the <AREA> tags recieve a border or fill color on rollover, have them recieve a background image. The image needs to be clipped by the shape of the <AREA>s.
Any ideas?
Basically the setup I have is as follows:
<img usemap="#map" />
<map name="map">
<area coords="foo,bar">
<area coords="foo,bar">
<area coords="foo,bar">
</map>
And I want the background image of each AREA tag to change on rollover.
A faux version of what I want is here:
tankedup-imaging. com/css_dev/rollover.html
…except that here, notice this is not a “true” image map, the rollover areas are not really bound by AREA tags.
OK, my solution.
Start with an image map like so:
Then, I use jQuery to swap the
SRCattribute of theIMGwhen the user hovers over each specificAREA, then return theIMGto the off state on mouseout.This could probably be combined with CSS Sprites somehow, swapping the
background-positionof some image during rollover.