Browsers have different transition end callbacks. So, I must create a addEventListener() to each.
addEventListener('transitionend', function() {
// the same below
});
addEventListener('webkitTransitionEnd', function() {
// the same above
});
But I don't like my code in this way. Why is not working when I write that way??:
addEventListener('transitionend webkitTransitionEnd', function() { });
// thing
});
The above does not work on any browser. The first one works.
Is there any better way? Any suggestions?