on(event, container, callback);
Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) has fired on the given element or among any of its children. Once the listener is fired, the provided callback is fired with the following params:
$animate.on('enter', container, function callback(element, phase) { // cool we detected an enter animation within the container } );
Parameters
Param | Type | Details |
---|---|---|
event | string | the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...) |
container | DOMElement | the container element that will capture each of the animation events that are fired on itself as well as among its children |
callback | Function | the callback function that will be fired when the listener is triggered The arguments present in the callback function are:
|
Please login to continue.