Create Dynamic Action
Event: Click - Button
Action: Execute JavaScript Code
const anim1 = lottie.loadAnimation({
container: document.getElementById('MyAnimationRegion1'), // required
path: `https://assets9.lottiefiles.com/packages/lf20_88z2psap.json`, // required
renderer: 'svg', // required
loop: false, // optional
autoplay: true, // optional
});
anim1.onComplete = () => {
document.getElementById("MyAnimationRegion1").innerHTML = "";
const anim2 = lottie.loadAnimation({
container: document.getElementById('MyAnimationRegion1'), // required
path: `https://assets6.lottiefiles.com/packages/lf20_pWVo9w.json`, // required
renderer: 'svg', // required
loop: false, // optional
autoplay: true, // optional
});
};