I am looking to implement a rotation and zoom in/out effect during the transition between different rotations of an image when a specific trigger occurs. The zoom should happen simultaneously with the rotation.
button.addEventListener('click', function() {
image.style.transform = 'scale(4) rotate(' + ja + 'deg) scale(0.25)';
image.style.transition = 'transform 2s ease-in-out';
ja+=90;
});
This code successfully works for the initial transition, but fails for subsequent transitions.
I have tried using @keyframes and states in my attempts, but none of them seem to work for this simple scenario.