1

This snippet works fine:

$("myelement").css({ rotateY(50deg) '})

I want this rotation to last 0.3second for instance

I tried with: but no success

$("myelement").css({transform: 'transition: all 0.3s ease-in; rotateY(50deg) '})
yarek
  • 11,278
  • 30
  • 120
  • 219

1 Answers1

2

Separate the transform and transition properties.

$("myelement").css({
  transition: 'all 0.3s', 
  transform: 'rotateY(50deg)'
});

And here's the demo.

Brett DeWoody
  • 59,771
  • 29
  • 135
  • 184