Html & JS rotate image 90 degrees on click

后端 未结 3 529
野的像风
野的像风 2021-01-22 14:19

I am trying to rotate right this image on click
Every click, the image will rotate 90 degrees right, so 4 clicks will get it to the original position.
For some reason as

3条回答
  •  醉梦人生
    2021-01-22 14:47

    You are selecting by class (.theImage), but that element is assigned an id, so you should select like this $('#theImage').

提交回复
热议问题