I have a basic understanding on jQuery’s animate() method and properties, but I want to take it even further…What resources do developers study to help rotate images via JavaScript / jQuery?
My current thought process is assuming that there are mathematical functions that you can store into variables and plug into the animate() jQuery sequence in order to see an object rotate 180 degrees on click. then when you click the object again, it rotates another 180 degrees.
My end goal is to have a < div > which uses a css background image, to all be rotated. The image itself will be a png file with transparency to help make the rotation appear more seamless. If that sounds stupid, please let me know – but that is what I’m picturing in my head…
I’m just looking for direction on learning this process
Thanks!
You can either manipulate the CSS transform properties, or add the image to a canvas element, where you can use a native rotate method, or manually reposition the image’s pixels.