I am trying to get an element to animate the rotation effect using jquery, I have this jsFiddle . So far I have this:
$(".icon").hover(function() { $(this).stop().animate({transform: "rotate(-90deg)", height: "200px"},400); },function() { $(this).stop().animate({backgroundColor : "black", color: "red"},400); });
But it doesn't rotate it at all, I understand that the correct way to install css is:
-webkit-transform: rotate (30deg);
I tried this:
$(this).stop().animate({-webkit-transform: "rotate(-90deg)", height: "200px"},400);
but then even the height does not change. any advice will help thanks!
JSFiddle Link
jquery css rotation transform
Doug molineux
source share