I am trying to rotate an image 90 degrees when I click on it.
<img src="img/right-arrow.png" alt="" class="rotate-image">
Using CSS, I can achieve the rotation by adding the following code:
.rotate-image {
transform: rotate(90deg);
}
However, when attempting to implement the rotation using jQuery, it doesn't seem to be working. Here is my jQuery code:
$('.rotate-image').click(function(){
$(this).css("-webkit-transform", "rotate(90deg)");
});