$(element).addEvent('transitionend', function(e){
// do soming...
});
In firefox, it not works. But, use addEventListener instead of addEvent, it work. Does mootools not supports css events?
right... to quote the docs:
Not all events are supported by MooTools' Element Events API because of edge use cases or new events supported by the browser. To add support for a native event, just augment the
Element.NativeEvents
object with the key and appropriate key value (use the above). For example to add popstate support in your application:
Element.NativeEvents.popstate = 2;
// Now element.addEvent('popstate', fn); will work everywhere
so in your case, it's easy
Element.NativeEvents.transitionend = 2;
var foo = document.getElement('.foo');
foo.addEvent('transitionend', function(){
alert('done');
});
foo.removeClass('bar');
in action: http://jsfiddle.net/gf72uu37/
this can now probably be fixed at least for the events that are standardised and vendor prefix free. but browser support will be patchy and mootools tries to support even IE8...