Is there any way to check if element is being animated?
But being animated not with jquery's animate, but with css3's transition..
The problem I have is... I have this slider, on arrow click I give it
left = left+200
where left is either
element.position().left
or
parseInt(element.css("left"));
(it doesn't really matter, the problem occurs with either)
the element is being animated with
transition: left 400ms ease-in-out;
so, when the user clicks on the arrow once and then again before the animation finishes, left returns value depending on its position(so instead of say.. 400px, it might return 235.47px since it was clicked in the middle of the animation)..
See Question&Answers more detail:os