How do you detect when CSS animations start and end with JavaScript? -
this question has reply here:
css3 transition events 5 answersi used animating elements javascript. found simpler css3.
using javascript how can observe when css animation has started , when has ended? there way @ all?
bind appropriate events element, e.g.
el.addeventlistener("animationstart", function() {}, false); el.addeventlistener("animationend", function() {}, false); el.addeventlistener("animationiteration", function() {}, false);
https://developer.mozilla.org/en-us/docs/css/tutorials/using_css_animations#using_animation_events
note: may need add together appropriate prefixed-events well, e.g. webkitanimationend
javascript css animation
No comments:
Post a Comment