I have an animation set on an :after element and a event handler on the animationend event. However, the animationend event never fires in IE10/IE11.
$(document).ready(function(){
var testdiv = $('#testid');
testdiv.on('animationend webkitAnimationEnd', function(){
document.writeln('Animation has ended');
});
});
JSFiddle: http://jsfiddle.net/Robin_f/R3qEG/
Sincerely hope someone can help me with this.
After searching the web it has become apparent that IE does not yet support the binding to animation events on a pseudo element. This is made more obvious by the jsFiddle I posted in my original post, which doesn't trigger the event when the animation ends.
It's because:
You can use
console.log()
to debug instead:Updated Fiddle
or:
Updated Fiddle
Looks like a bug in IE or maybe designed like this by DEV team, don't know. A workaround, really hacky, could be to set a fake animation on element to handle IE10/11:
NOTE: firefox will fire event twice, should filter it for Firefox to get logic fired only once.
Could be done using:
See DEMO jsFiddle