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
  • 10,010
  • 26
  • 106
  • 195

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
  • 55,478
  • 28
  • 131
  • 182