I need to set infinite rotating but it doesn't work.
function AnimateRotate(angle) {
var $elem = $('.icon-repeat');
$({deg: 0}).animate({deg: angle}, {
duration: 5000,
step: function(now) {
$elem.css({
transform: 'rotate(' + now + 'deg) infinite'
});
}
});
}
That is my code, and this line transform: 'rotate(' + now + 'deg) infinite' .. if I remove infinite it works for one rotate, but I need to rotate infinite.. I have to write it in JS, I think...