This time I will share jQuery Plugin and tutorial about Cross-browser jQuery Image Rotation Plugin – jqueryRotate, hope it will help you in programming stack.
jqueryRotate is a lightweight, cross-browser jQuery plugin used to rotate an image to any angle using CSS3 transforms. With fallsbacks to CANVAS and/or VML (IE6) for old browsers which don’t support CSS3 transform property.
How to use it:
1. Place the script jQueryRotate.js
after jQuery library and the jqueryRotate is ready for use.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "jQueryRotate.js" ></ script > |
2. The JavaScript to rotate your image by a given angle.
3. Add an animation to the image while rotating.
4. Config the duration of the rotate animation.
5. Easing function is supported as well.
6. Execute a callback function when the animation is completely finished.
7. Get the current angle of rotated image.
5 |
alert($( this ).getRotateAngle()); |
8. Stop the rotate animation manually.
This awesome jQuery plugin is developed by wilq32. For more Advanced Usages, please check the demo page or visit the official website.