In my previous project I needed to rotate some elements, but I hadn't found any jQuery plugins regarding this issue. (which of course works with ie7 and ie8 as well!)
So I decided to take some time and write this small snippet for jQuery to make the CSS3 rotation easier. It's a little slow with internet explorer 7 and internet explorer 8, but it still works. (since ie7 and 8 use the deprecated filter method)
Returns the current rotation of the element in degrees.
Rotates the current element by “val” degress.
Rotates the current element to “val” degress.
And basically that's it. You can use these functions to achieve the basic rotations with jQuery.
First of all include the scrip in your header file:
After that you can use the new functions wherever you want to:
DownloadjQuery element rotation plugin (2444)
Latest posts by Ernest Marcinko (see all)
- Saving space automatically – Beginners guide to Digital Ocean - May 6, 2016
- From XAMPP to Vagrant WordPress - January 5, 2016
- Bulletproof queries in WordPress – preventing SQL injections - September 28, 2015