To see when the css transition ended, you can use transitionend.
The transition event occurs when the CSS transition completes.
source: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/transitionend
Where you can simply use the flags to see when the animation has finished and when not. Here is an example:
var AnimationComplete;
$('div').click(function() {
$(this).addClass('green');
AnimationComplete= false;
console.log(AnimationComplete);
});
$("*").bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() {
AnimationComplete= true;
alert('animate ended');
console.log(AnimationComplete);
return false;
});
, BAD *, [ s] . .
, , , , "" AnimionComplete .
3 : , .