JavaScript API Changes
Opened this issue · 0 comments
gakimball commented
Here are some things we want to add or change to the JavaScript API.
animateIn
and animateOut
would be renamed transitionIn
and transitionOut
, to make it less confusing that a function called "animate" only works with transitions.
Right now there's no method to add animations, because all you need to do is add a class. But we could write a wrapper that also handles removing the class for you, and giving you a callback that fires when the animation completes (if it has a finite number of loops).
It might look like this:
MotionUI.animate('#element', 'wiggle', function() {
// Animation done
});