I have a pie chart, I also have a legend with words that identifies what each color on the pie chart represents. I am trying to implement a hover element, so when the user hovers over each word in the legend, it highlights that section of the pie chart (basically by swapping images). So the users have a point of reference
I have seven words in the legend, each word represents its own div (id=legend1,2,3, etc.), I can’t get the HTML code to handle dynamically change the pie chart (div class=chart), based on a hover command coming from several different divs(id=legend1,2,3,etc.). In the link added, it works if I am only using one div(legend1) to change the div (class=chart) from it’s default image to another. But trying to add multiple divs (legend2,3,etc.)stops the first legend hover effect from working.
I think this calls for javascript, but I am not sure. Can someone please help me with this, I am not too skilled in javascript, if in fact it is the case.
How about using this technique:
http://jsfiddle.net/KsYrH/1/
Basically nested div tags absolute positioned that can be target with parent element hover. No javascript needed.
CSS