A method extended from the jQuery animate() method. It supports CSS transform property and 3D acceleration.
#jquery-plugin #animation
IE 10+, latest of Chrome/FF/Safari, iOS 7+ and Android 2.3+ (except 3.x)
<div id="area">
<script src="//naver.github.io/egjs-jquery-transform/release/latest/dist/transform.js"></script>
import "@egjs/transform";
// Animate element infinitely
var $rectBox = $("#rectBox");
function rotate() {
$rectBox.animate({"transform": "rotate(360deg)"}, "slow", rotate);
}
rotate();
// Animate element infinitely
var $rectBox = $("#rectBox");
function rotate() {
$rectBox.animate({"transform": "rotate(360deg)"}, "slow", rotate);
}
rotate();