Rotate
The simple, easy-to-implement animation plugin to rotate icons, images, and elements.
Getting Started
Download and Setup
To use this plugin, include the jQuery library and the Rotate.js plugin before the closing <body>
tag of your HTML document:
Install with Bower
$ bower install rotate.js
Install with npm
$ npm install rotate-icon
Dependencies
Required:
jQuery (1.2.1 or higher)
Usage
JavaScript
To use the export plugin, just call:
;
You can also specify an angle of rotation (in degrees).
;
Additional properties can be passed in to customize the timing and overall behavior of the animation.
/* Defaults */;
Settings
Below are the plugin defaults.
/* default animation rotation (degrees) */ $fnrotatedegrees = 360; /* default duration, easing, and completed callback */ $fnrotatedefaults = duration: 1000 easing: 'swing' { } ;
Browser Support
Chrome | Firefox | IE | Opera | Safari | |
---|---|---|---|---|---|
Android | ✓ | ✓ | ✓ | ✓ | ✓ |
iOS | ✓ | ✓ | ✓ | ✓ | ✓ |
Mac OSX | ✓ | ✓ | ✓ | ✓ | ✓ |
Windows | ✓ | ✓ | ✓ | ✓ | ✓ |
Live Demo
A live, interactive demo can be found here:
www.travismclarke.com
License
Rotate.js is licensed under the terms of the MIT License
Credits
- John Resig - jQuery