Reputation: 11812
I have this element in my code:
<img id="pswheel" src="images/wheel.png" style="transform: rotate(315deg); transform-origin: 50% 50% 0px;">
Now I want to change the rotation value from 315 to 0 on a click event. How do I do that?
Upvotes: 1
Views: 3151
Reputation: 38252
Try this:
$('elementtoclick').click(function(){
$('img').css('transform','rotate(0deg)');
})
Upvotes: 1