I am trying to make a piechart by rotating the overlapping divs. I need to take action on mouseover or hover. Every thing is working fine if the sum of the first and last slice is 180deg or greater than 180deg.
But it stops taking hover event when the sum goes below.
Please visit
http://jsfiddle.net/fjBfE/
here when i do mouseover on the green slice– at some points its mouseover is not working and at some points its working.
There is this inherent problem with this model. if you want to keep div elements in loop, you have to
Here’s what I meant:
remove this comment in the beginning of the code:
/* -moz-border-radius: 150px;and things will look circular.http://jsfiddle.net/KzG2Z/ : square one
http://jsfiddle.net/KzG2Z/1/ : circular one
If you can use there are pretty cool JS solutions that you can use.
http://www.artetics.com/Articles/using-various-javascript-libraries-to-create-pie-chart
http://g.raphaeljs.com/
In the end what you have tried to do is sort of close circuit design, it closes. (couldn’t help myself) (circuit was redundant)
Also there are some issues, if you want to dynamically do this, you are cornered even before you tackle that because you aren’t using JS | jQuery, if you have been, there are APIs… you know. (again)