Change js animation for new API