Is it possible to queue CSS transitions with the same properties? My goal is to translate an element to a specific position (with a transition duration of 0) before translating it again.
For example, in this mockup, clicking "move" should move the box 100px to the right before translating it 100px to the left.
- Why doesn't this work? Does the second transition overwrite the first one?
https://jsfiddle.net/aqwaypoh/3/
- I found a solution that works by using a non-zero transition duration (0.01), otherwise the transitionend event doesn't fire.
https://jsfiddle.net/dpv3xzth/5/
Although I was able to fix the issue of the transitionend event firing twice in Chrome, I'm wondering if there is a better way to achieve this without relying on the end event or a timer?
If possible, I would prefer to write this without using the end event or timer. Is there a more efficient approach?
<div class="box"></div>
<a href="#" class="move">move</a></a>