I am stuck at a point.There are 10 straight lines(png image).What I want is after the first line rotates by 40 deg,then the second line should start its rotaion and then the third,fourth,fifth and so on!!!
code:
<div class=hair onclick=rotate()>
<img src=single.png id=1 width=10 height=40>
<img src=single.png id=2 width=10 height=40>
<img src=single.png id=3 width=10 height=40>
<img src=single.png id=4 width=10 height=40>
<img src=single.png id=5 width=10 height=40>
<img src=single.png id=6 width=10 height=40>
<img src=single.png id=7 width=10 height=40>
<img src=single.png id=8 width=10 height=40>
<img src=single.png id=9 width=10 height=40>
<img src=single.png id=10 width=10 height=40>
</div>
Javascript:
function rotate(){
for(var i=1;i<11;i++)
{
setInterval(function(){
document.getElementById(i).style.WebkitTransitionDuration=1s;
document.getElementById(i).style.webkitTransform = 'rotate(40deg)';
},100)
}
}